IValidatorExtensionsFirstErrorType Method |
Returns
Type of the first validation error in
Errors.
Namespace: CMS.BaseAssembly: CMS.Base (in CMS.Base.dll) Version: 13.0.131
Syntax public static Type FirstErrorType(
this IValidator validator
)
Parameters
- validator
- Type: CMS.BaseIValidator
Validator whose first error type to retrieve.
Return Value
Type:
TypeReturns
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 Exception | Condition |
---|
ArgumentNullException | Thrown when validator is null. |
InvalidOperationException | Thrown when the Errors property of validator is an empty enumeration. |
See Also