Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetErrors Method

ValidationHelper.GetErrors Method

Returns a list of current validation errors, and optionally lets you specify a list of fields to check.

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

member GetErrors : 
        fields:string[] -> IEnumerable<string> 


Type: System.String[]
Optional. The names (value of the name attribute) of the user input elements to get error information for. You can specify any number of element names, separated by commas. If you do not specify a list of fields, the method returns errors for all fields.

Return Value

Type: System.Collections.Generic.IEnumerable(String)
The list of errors.
© 2015 Microsoft