This project is read-only.
1

Closed

Additional validators

description

Add validators for the following:
  1. floating-point numbers
  2. file masks
  3. e-mail addresses
  4. urls
Closed Nov 15, 2011 at 12:09 PM by jeevanjj
Done

comments

jeevanjj wrote Jul 21, 2007 at 7:28 AM

Instead of adding additional validator classes for these items, we'll add a constants class that contains regular expressions for these common patterns, and these can be used from the RegexValidatorAttribute class.

In addition, we'll make the RegexValidator attribute class unsealed, so others can make specific versions for any pattern.

wrote Jul 21, 2007 at 7:28 AM

jeevanjj wrote Jul 21, 2007 at 7:30 AM

Instead of adding additional validator classes for these items, we'll add a constants class that contains regular expressions for these common patterns, and these can be used from the RegexValidatorAttribute class.

In addition, we'll make the RegexValidator attribute class unsealed, so others can make specific versions for any pattern.

wrote Jul 21, 2007 at 7:30 AM

pbaxter wrote Nov 26, 2007 at 12:34 PM

Great idea for extensibility. I had a similar need but used a slightly different approach. I developed an interface and then created a set of common interfaces that the system could use - in my case these are "tear-off" filter conditions. You can build your own validator by implementing the interface and adding it to the existing list of interfaces. You might also make your base classes sealed so the user must create a derived class and can then add their own interfaces there. Just a suggestion. Looking forward to the next drop.

wrote Nov 15, 2011 at 12:09 PM

wrote Oct 31, 2012 at 6:39 PM

wrote Feb 14, 2013 at 2:09 AM

wrote May 16, 2013 at 4:17 AM