Hello all, I have a struts 1.1 app that I want to use Validator Framework to validate the user input on the browser. This app will need user to enter username and password. These two fields are both required fields and the minlength and maxlength of password is 5 and 8.
I have myEclipse generate the validator-rules.xml, which means the validator of "required", "minlength" and "maxlength" are generated automatically. And the validation.xml is like this: .... <form-validation> <formset> <form name="logonForm"> <field property="username" depends="required"> <arg0 key="LOGIN.FORM.USERNAME"/> </field> <field property="password" depends="required,minlength,maxlength"> <arg0 key="LOGIN.FORM.PASSWORD"/> <arg1 name="minlength" key="${var:minlength}" resource="false"/> <arg1 name="maxlength" key="${var:maxlength}" resource="false"/> <var> <var-name>minlength</var-name> <var-value>5</var-value> </var> <var> <var-name>maxlength</var-name> <var-value>8</var-value> </var> </field> </form> </formset> </form-validation> When I test my app, only the "required" validator is working, and I got a popup which says "The user name is required. The password is required.". The problem is I did not get any message about the minlength and maxlength validation in the popup when I input a password with length 3 and 11. Why only the "requred" validator work? I appreciate for nay answer! Lucy --------------------------------- Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping