Differences between revisions 1 and 2
Revision 1 as of 2005-03-22 05:48:35
Size: 994
Editor: anonymous
Comment: missing edit-log entry for this revision
Revision 2 as of 2009-09-20 23:12:24
Size: 994
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Up to ["ValidatorFAQ"] Up to [[ValidatorFAQ]]
Line 32: Line 32:
Up to ["ValidatorFAQ"] Up to [[ValidatorFAQ]]

Up to ValidatorFAQ

I want to use Validator for client-side {{{ validation. I put definations in validation.xml, put

  • onsubmit="return validateRegistryForm(this);" in my jsp file and do not touch validator-rules.xml. When I press submit button, the javascript validation does not work. Any wrong with that? Leon }}}


Minimum steps to have built-in validation working:

1. Add validation plug-in into the struts-config.xml 2. Put definitions in validation.xml 3. Add to the page: {{{ a) In the head section: <html:javascript formName="<form_name>" />

  • b) for the form tag: onsubmit="return validate<form_name>(this)" }}}

4. Create application resource file with required keys (if does not exist yet) 5 Add reference to resource file into the struts-config.xml

P.S. it is possible to avoid step #4 and #5 if definitions in validation.xml do not require resources.

Regards, Sergey Smirnov

Up to ValidatorFAQ

ValidatorMinimumSteps (last edited 2009-09-20 23:12:24 by localhost)