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)

public IEnumerable<string> GetErrors(
	params string[] fields
)

Parameters

fields
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.
Show: