ValidationHelper.Add Method (IEnumerable<String>, IValidator[])
Registers a list of user input elements for validation.
Namespace: System.Web.WebPages
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Syntax
'Declaration
Public Sub Add ( _
fields As IEnumerable(Of String), _
ParamArray validators As IValidator() _
)
'Usage
Dim instance As ValidationHelper
Dim fields As IEnumerable(Of String)
Dim validators As IValidator()
instance.Add(fields, validators)
public void Add(
IEnumerable<string> fields,
params IValidator[] validators
)
public:
void Add(
IEnumerable<String^>^ fields,
... array<IValidator^>^ validators
)
member Add :
fields:IEnumerable<string> *
validators:IValidator[] -> unit
public function Add(
fields : IEnumerable<String>,
... validators : IValidator[]
)
Parameters
- fields
Type: System.Collections.Generic.IEnumerable<String>
The names (value of the name attribute) of the user input elements to validate.
- validators
Type: System.Web.WebPages.IValidator[]
The type of validation to register for each user input element specified in fields.