View Single Post
  #10 (permalink)  
Old 08-19-2008, 06:44 AM
beck beck is offline
Member
 
Join Date: Aug 2008
Posts: 1
beck is on a distinguished road
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.
Reply With Quote