Back to Devexpress

Localize Validation Messages

expressappframework-113129-validation-localize-validation-messages.md

latest2.2 KB
Original Source

Localize Validation Messages

  • Feb 17, 2026
  • 3 minutes to read

XAF applications can be localized to the required language. This topic explains localization of the validation messages that are shown to users when a rule is broken or the Validation Action is executed. Refer to the Localization Basics topic, to get general information on localization.

To localize validation messages, use the Model Editor invoked for the required language (see Localize UI Elements). In the sections below, you will learn which nodes should be localized.

Localize Message Text

Navigate to the Localization | Exceptions | UserVisibleExceptions | Validation node.

The child nodes represent the messages that are displayed by the Validation System in different contexts:

  • ActionErrorMessageHeaderFormat

  • AllContextsErrorMessageHeader

  • DeleteErrorMessageHeader

  • SaveErrorMessageHeader

  • ValidationSucceededMessageHeader

Write the appropriate localized text in the Value property of these nodes.

Localize Rule Description

Navigate to the Validation node.

To localize the text that describes a broken rule in the validation message, use one of the following approaches:

  • The Validation | ErrorMessageTemplates node

  • The Validation | Rules node

In a message template, you can use format items. For instance, when using the {TargetPropertyName} format item, the caption of the validated property will be inserted in the rule description. For details, refer to the RuleBaseAttribute.CustomMessageTemplate property description.