Click or drag to resize
IValidationErrorExtensionsGetMessage Method
Returns a localized message with substituted parameters for validationError.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 12.0.0
Syntax
C#
public static string GetMessage(
	this IValidationError validationError,
	string culture = null
)

Parameters

validationError
Type: CMS.BaseIValidationError
Validation error whose localized message to retrieve.
culture (Optional)
Type: SystemString
Culture to use for localization.

Return Value

Type: String
Returns a localized message for validation error.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IValidationError. 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 validationError is null.
Remarks
The default culture is used for messages which are missing localization in specified culture.
See Also