ValidationHelper.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Add(IEnumerable<String>, IValidator[]) |
Registers a list of user input elements for validation. |
Add(String, IValidator[]) |
Registers a user input element for validation. |
Add(IEnumerable<String>, IValidator[])
Registers a list of user input elements for validation.
public void Add (System.Collections.Generic.IEnumerable<string> fields, params System.Web.WebPages.IValidator[] validators);
member this.Add : seq<string> * System.Web.WebPages.IValidator[] -> unit
Public Sub Add (fields As IEnumerable(Of String), ParamArray validators As IValidator())
Parameters
- fields
- IEnumerable<String>
The names (value of the name attribute) of the user input elements to validate.
- validators
- IValidator[]
The type of validation to register for each user input element specified in fields
.
Applies to
Add(String, IValidator[])
Registers a user input element for validation.
public void Add (string field, params System.Web.WebPages.IValidator[] validators);
member this.Add : string * System.Web.WebPages.IValidator[] -> unit
Public Sub Add (field As String, ParamArray validators As IValidator())
Parameters
- field
- String
The name (value of the name attribute) of the user input element to validate.
- validators
- IValidator[]
A list of one or more types of validation to register.