Click or drag to resize
IValidatorExtensionsGetErrorMessages Method
Returns collection of localized error messages that occurred during validation.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 12.0.0
Syntax
C#
public static IEnumerable<string> GetErrorMessages(
	this IValidator validator,
	string culture = null
)

Parameters

validator
Type: CMS.BaseIValidator
Validator for which to get error message.
culture (Optional)
Type: SystemString
Culture to use for localization.

Return Value

Type: IEnumerableString
Collection containing error messages of the validator.

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).
Remarks
The default culture is used for messages which are missing localization in specified culture.
See Also