Click or drag to resize
IValidatorExtensionsFirstErrorType Method
Returns Type of the first validation error in Errors.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 12.0.0
Syntax
C#
public static Type FirstErrorType(
	this IValidator validator
)

Parameters

validator
Type: CMS.BaseIValidator
Validator whose first error type to retrieve.

Return Value

Type: Type
Returns Type of the first validation error.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IValidator. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when validator is null.
InvalidOperationExceptionThrown when the Errors property of validator is an empty enumeration.
See Also