Index

Add XDoclet Tags, cont.

  1. For each setter method on the UserForm form, look in its JavaDoc for:
    * struts.validator ...
  2. Add an @ sign to the beginning so that a validation rule will be generated for this field.
    * @struts.validator ...
  3. For starters, you may just want to do this for the "required" rules on the getPassword() and getConfirmPassword() methods.
    @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: 3