The Struts Validator, in some form, has been available since the days of Struts 0.5. It was orignally packaged as a developer contribution. Later, the core code was moved to the Jakarta Commons and a Struts specific extension became part of Struts since 1.1.
For the convenience of the many developers who have been using the Struts Validator all along, this document first overviews the core functionality and then covers the changes and new functionality added since Struts 1.1.
Once you have configured the Validator Plug-In, so that it can load your Validator Resources you just have to extend org.apache.struts.validator.action.ValidatorForm instead of org.apache.struts.action.ActionForm. Then when the validate method is called, the action's name attribute from the struts-config.xml is used to load the validations for the current form. So the form element's name attribute in the validator-rules.xml should match action element's name attribute.
Another alternative is to use the action mapping you are currently on by extending the ValidatorActionForm instead of the ValidatorForm. The ValidatorActionForm uses the action element's path attribute from the struts-config.xml which should match the form element's name attribute in the validator-rules.xml.
Then a separate action can be defined for each page in a multi-page form and the validation rules can be associated with the action and not a page number as in the example of a multi-page form in the validator example.
Struts Validation Framework use Custom Tag to implement this solution so if you need to know how this work. Se detail in struts-html.tld and source of validation in struts.jar (org\apache\struts\validator package)
---- you can download source code of struts from Apache Jakarta Struts website. ------
Java Developer, Thailand