VAB: Cannot use custom validator when using configuration file

Topics: Validation Application Block
May 24, 2007 at 4:45 PM
Created a simple custom validator and added it to config file and test showed none of the results from other validators were captured. Removed custom validator and all was well.

Suspected bug: Custom validators cannot be used with configuration?
May 26, 2007 at 8:13 PM
Custom validators work fine with configuration.

Check the ValidationQuickStart that ships with Enterprise Library 3.x and has a example of a custom validator, called DivisibleByValidator, that is used with configuration.




David Hayden
Microsoft MVP C#
May 28, 2007 at 4:50 PM
Thanks David for taking the time to look into this.

I got it working and I believe it was due to missing constructors. The attributes constructor is required even if you do not plan to use attributes.