Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Annotations can be used as an alternative to XML for validation.

 

Bean Validation

With struts 2.5 comes the Bean Validation Plugin. That is an alternative to the classic struts validation described here. See the Plugin Page for details.

Examples

In all examples given here, the validation message displayed is given in plain English - to internationalize the message, put the string in a properties file and use a property key instead, specified by the 'key' attribute. It will be looked up by the framework (see Localization).

...