Click or drag to resize
IValidatorExtensionsContainsTValidatorError Method
Returns a value indicating whether a validation error of type TValidatorError is in Errors.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 12.0.0
Syntax
C#
public static bool Contains<TValidatorError>(
	this IValidator validator
)

Parameters

validator
Type: CMS.BaseIValidator
Validator whose errors to examine.

Type Parameters

TValidatorError
Validation error type to search for.

Return Value

Type: Boolean
Returns true if a validation error of type TValidatorError is in Errors, otherwise returns false.

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.
See Also