Share via


ValidationHelper.IsValid Method

Determines whether the contents of the user input fields pass validation checks, and optionally lets you specify a list of fields to check.

Namespace:  System.Web.WebPages
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Function IsValid ( _
    ParamArray fields As String() _
) As Boolean
'Usage
Dim instance As ValidationHelper 
Dim fields As String()
Dim returnValue As Boolean 

returnValue = instance.IsValid(fields)
public bool IsValid(
    params string[] fields
)
public:
bool IsValid(
    ... array<String^>^ fields
)
member IsValid : 
        fields:string[] -> bool
public function IsValid(
    ... fields : String[]
) : boolean

Parameters

  • fields
    Type: System.String[]
    Optional. The names (value of the name attribute) of the user input elements to check for validation errors. You can specify any number of element names, separated by commas. If you do not specify a list of fields, the method checks all elements that are registered for validation.

Return Value

Type: System.Boolean
true if all specified field or fields pass validation checks; false if any field contains a validation error.

See Also

Reference

ValidationHelper Class

System.Web.WebPages Namespace