|
Today I have the same problem, I'm using Struts1.1, its validator-rule.xml dtd is 1.0.
I found you are validating a 'password' field, then I came across the problem that it can't alert a message when the field'e length is less then 'minlength' I defined in validation.xml. You can find the javascript code of function validateMinlength() in validator-rule.xml, there is a piece of follows:
if (field.type == 'text' || field.type == 'textarea')
so it won't validate field of 'password' type, you can change it to
if(field.type == 'text' || field.type == 'textarea' || field.type == 'password')
then it will work fine. I'm not sure whether it is a bug or there is some other reasons.
|