Versions Compared

Key

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

If you don't know already, WebWork uses XWork as its foundation, which does provide a validation framework to help you apply input validation rules to your Actions before they are executed. This section provide only enough details to help you get started but always refer to Validation Framework for more information.

Reference pages

  1. Simple validators
  2. Visitor validation
  3. Client-Side Validation
  4. Validation Examples

Register validators

Validators must be registered with the ValidatorFactory. This may either be done programmatically, using the registerValidator(String name, Class clazz) static method of the ValidatorFactory, or by putting a file name validators.xml in the root of the classpath (/WEB-INF/classes) with a structure like this:

...