struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Shneyderman" <a...@law.columbia.edu>
Subject RE: Can Validator javascript show more than one error at a time?
Date Sat, 26 Jul 2003 18:26:12 GMT
It will just one type at a time:

Suppose you have 3 fields A,B and C

A depends="required,mask,date"
B depends="required,mask"
C depends="required,date"

Now user fills out the form and forgets to put A and B
User will see the message A and B missing
When user provides A, B and C but suppose A is not masked correctly
You will only see one message for A out of mask even if C is not a
correct date. 

So only the same kinds of validations will be alerted about together.

You can kind of see it from the JavaScript that is being generated for
your validation function. 

The function usually goes like this

  return validateDepends1 (form) && validateDepends2 (form) ....

if validateDepends1 (form)  is false js stops execution and all the
depends1 errors are displayed

HTH,
Alex.

> -----Original Message-----
> From: news [mailto:news@main.gmane.org] On Behalf Of Brian Chaplin
> Sent: Saturday, July 26, 2003 1:35 PM
> To: struts-user@jakarta.apache.org
> Subject: Can Validator javascript show more than one error at a time?
> 
> Somehow Ted Husted was able to get the javascript to show more than
one
> error at a time in the javascript alert message.
> See screen shot on page 373 of Struts in Action.
> I'm using Struts 1.1 final and it seems the javascript won't support
that?
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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