ValidationHelper.Validate(String[]) 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.
Performs validation on elements registered for validation, and optionally lets you specify a list of fields to check.
public System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(params string[] fields);
member this.Validate : string[] -> seq<System.ComponentModel.DataAnnotations.ValidationResult>
Public Function Validate (ParamArray fields As String()) As IEnumerable(Of ValidationResult)
Parameters
- fields
- String[]
Optional. The names (value of the name attribute) of the user input elements to validate. You can specify any number of element names, separated by commas. If you do not specify a list, the method validates all registered elements.
Returns
The list of errors for the specified fields, if any validation errors occurred.