WebWork relies on XWork validation framework to enable the application of input validation rules to your Actions before they are executed. This section only provides the bare minimum to get you started and focuses on WebWork's extension of the XWork validators to support client-side validation.
There is also an option for AJAX based asynchronous validation, please see Remote Form Validation for more information.
There is also an option for Client-Side (Javascript) based validation, please see Client-Side Validation for more information.
Examples
- Basic Validation
- Client Validation
- Ajax Validation
- Using Field Validators
- Using Non Field Validators
- Using Visitor Field Validator
Validators available in WebWork
Note
When using a Field Validator, Field Validator Syntax is ALWAYS preferable than using the Plain Validator Syntax as it facilitates grouping of field-validators according to fields. This is very handy especially if a field needs to have many field-validators which is almost always the case. Examples: #validatortypes
- required validator
- requiredstring validator
- int validator
- date validator
- expression validator
- fieldexpression validator
- email validator
- url validator
- visitor validator
- conversion validator
- stringlength validator
- regex validator
Registering Validators
This list declares all the validators that comes with WebWork.
Note
Warning
Turning on Validation
Note: The default validationWorkflowStack already includes this.