Using the Provided Validators Home
Enterprise Library 3.1 - May 2007
Using the Provided Validators

The Validation Application Block includes classes named validators, which derive from the Validator class. There is a generic version of this class named Validator<T>.

Every validator is associated with a specific type. For example, the StringLengthValidator class checks to see if a System.String value has a length within a predefined range.

There are three ways that you can associate validators with your types:

You can also instantiate validators within your code without associating them with a specific type. For more information, see Details of Creating Validators Programmatically.

The following sections describe the validator types that are included with the Validation Application Block. These validators are:

Each entry contains examples for how to use the validator with attributes and with code. For an example of how to use configuration, see the Validation QuickStart.

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View