Versions Compared

Key

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

...

Note: The default validationWorkflowStack already includes this.

Validator Scopes

Field validators, as the name indicate, act on single fields accessible through an action. A validator, in contrast, is more generic and can do validations in the full action context, involving more than one field (or even no field at all) in validation rule.
Most validations can be defined on per field basis. This should be preferred over non-field validation whereever possible, as field validator messages are bound to the related field and will be presented next to the corresponding input element in the respecting view. Non-field validators only add action level messages.
Non-field validators are mostly domain specific and therefore often custom implementations. The most important standard non-field validator provided by XWork/WebWork is ExpressionValidator.

Defining Validation Rules

...