Index

validation.xml

This is the easily one of the best features - generating your validation.xml file for you.

<form name="userForm">
    <field property="username"
        depends="required">
        
        <msg
            name="required"
            key="errors.required"/>

    </field>
</form>

Is generated by using the following XDoclet tag on the setter of your Form.

* @struts.validator type="required" msgkey="errors.required"

Note: The "msgkey" attribute is not required. The rule's default key will be used if you do not specify one.

Slide No: 8