struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul, R. Chip" <ROY.C.PAUL....@saic.com>
Subject RE: Bug in Validator javascript, not showing all errors?
Date Wed, 25 Feb 2004 19:03:22 GMT
There's a parameter or setting somewhere that controls whether to return
only the first error, or all the errors in the javascript alert window.

Sorry I don't have the exact name handy.

Chip

-----Original Message-----
From: Mike Millson [mailto:mmillson@meritonlinesystems.com] 
Sent: Wednesday, February 25, 2004 12:58 PM
To: Struts Users
Subject: Bug in Validator javascript, not showing all errors?


I have a form with 1 text field and 1 password field:
username: required and maxlength 10
password: required

The return statement for the validateLoginForm function generated in the
dynamic javascript:

return validateMaxLength(form) && validateRequired(form); 

If I enter a username that is too long, validateMaxLength returns false, so
validateRequired is never evaluated. The result is that only the error about
username being too long is displayed, even if password is empty.

This is not how it works on the server side. If I disable javascript and
submit, the server side displays both errors: username too long and password
required.

Is this a bug? Why aren't the client side and server side validation results
equal?

Thank you,
Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message