Custom Validator with Full-design Support

Topics: Building and extending application blocks, Enterprise Library Core, General discussion, Validation Application Block
May 24, 2011 at 10:45 AM
Edited May 24, 2011 at 11:38 AM

Hi guys, 

I've finished developing a custom validator for VAB (a collection count validator, based on the RangeValidator). It works as expected, but whenever I add a new CollectionCountValidator with the EntLib Config tool, the node "type" (which points to the validator and the assembly where is in) in my XML config, always remains empty.

Any tip?

Thanks in advance!

May 24, 2011 at 4:41 PM

Hmm I remember to have something like this before but I couldn't recall how it was resolve or if it was resolve.

Anyway, does your assembly placed in the same location of the Entlib Config tool (by default if using MS signed assemblies is C:\Program Files\Microsoft...5.0\Bin)? If not, could you try placing it in the same location of Entlib Config tool and see what will happen.

Gino Terrado
Global Technologies and Solutions

Avanade, Inc.


May 24, 2011 at 4:44 PM


It is in the same directory of the config tool, I can see my new validator in the contextual menu, but when I click on it, the generated xml node is not properly defined: type=""


May 24, 2011 at 5:14 PM

Okay, let me try this out and I'll keep you posted whatever I may find. Though if you have a repro project for this that would also be helpful for further investigation. You can send it in thru our email -

Gino Terrado
Global Technologies and Solutions

Avanade, Inc.

May 24, 2011 at 5:15 PM
Edited May 24, 2011 at 5:16 PM

Thank you! If you need the source code I can send it to you, it's quite basic.


PS: Ok! I'm sending it right now!

May 25, 2011 at 4:51 PM

Got it! What you only missing in your CollectionCountValidatorData class is the assignment of the Type Name value. Your parameterless constructor should be as follows.

	/// <summary>
	/// <para>Initializes a new instance of the <see cref="CollectionCountValidatorData"/> class.</para>
	/// </summary>
        public CollectionCountValidatorData() { Type = typeof(CollectionCountValidator); }

Hope this solves the problem. 

Gino Terrado
Global Technologies and Solutions

Avanade, Inc.

May 25, 2011 at 4:56 PM

Thank you Gino, now it works as expected :-)


May 25, 2011 at 4:58 PM

Glad to hear it works :o)