Struts Validator
==================
The Struts Validator Jar (dist/struts-validator.jar),
Jakarta Commons Validator (http://jakarta.apache.org/commons) ,
and version 1.2 of the Jakarta Regular Expression Package
(http://jakarta.apache.org/regexp) needs to be added to /WEB-INF/lib.
This needs to be added to the web.xml file to load the ValidatorServlet.
validator
org.apache.struts.action.ValidatorServlet
config-rules
/WEB-INF/validator-rules.xml
config
/WEB-INF/validation.xml
debug
2
2
Add the error messages to your ApplicationResources.properties file for the pluggable validators that you
are using in your project. Make sure that you have errors.header & errors.footer in it if you are going to use
the Struts' html:errors tag. If you use the Validator errors tag then the header and the footer are optional and
configurable as to what message resource key is used to create the header and the footer. The message
resource key a pluggable validator uses to create an error message is configurable in the validation.xml file by
modifying the pluggable validator's msg attribute.
Example Error Messages:
errors.required=
{0} is required.
errors.invalid={0} is invalid.
Copy the validators that you want to use from the validation.xml file in /web/example/WEB-INF or make
your own.