Struts Action 2 relies on a validation framework provided by [XWork] 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 our extension of the XWork validators to support client-side validation.
Examples
- Basic Validation
- Client Validation
- AJAX Validation
- Using Field Validators
- Using Non Field Validators
- Using Visitor Field Validator
Bundled Validators
- 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
Error formatting macro: snippet: java.lang.NullPointerException
This list declares all the validators that comes with the framework.
Error formatting macro: snippet: java.lang.NullPointerException
Turning on Validation
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Note: The default validationWorkflowStack already includes this.
Validator Scopes
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Notes
Error formatting macro: snippet: java.lang.NullPointerException
Defining Validation Rules
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Validator Flavour
Error formatting macro: snippet: java.lang.NullPointerException
Non-Field Validator Vs Field-Validator
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Short-Circuiting Validator
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
How Validators of an Action are Found
Error formatting macro: snippet: java.lang.NullPointerException
Resources
WebWork Validation