<P>&nbsp;Are you using javascript validation? If not,
disregard this message.
<P>If so, the javascript rendered by the
JavascriptValidatorTag performs each required
validation before checking for the float validation.
Since an error is found in validateRequired,
validateFloat is not called. if you check out the
javascript, your validate methods are bound by
"&amp;&amp;". So the first method to find an error
ends the validation checks.
<P>hope this helps.
<P>&nbsp; <B><I>Struts Newsgroup
&lt;[EMAIL PROTECTED]&gt;</I></B> wrote: 
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT:
5px; BORDER-LEFT: #1010ff 2px solid">Subject: Struts
Validation - Stop on fail?<BR>From: "Andrej Sobkowski"
<[EMAIL PROTECTED]><BR>===<BR>Hello,<BR><BR>I've
been using the Struts Validator on a couple of
projects with no pbs but<BR>I'm now stuck with a
(probably easy-to-solve) issue. I have a
super-basic<BR>bean with 3 properties: name, density,
concentration. Both density and<BR>concentration are
required and must be float. My validation.xml is
shown<BR>below... standard, easy, nothing
special.<BR><BR>The problem is that if I enter an
invalid concentration (not a float) and I<BR>leave
density empty, I only get one message saying: "Density
is required"<BR>(no mention about the invalid
concentration). If I then enter
invalid<BR>concentration and density, I get the proper
results ("Density must be a<BR>float. Concentration
must be a float"). It looks like the "required"
gets<BR>the priority on the other validations. Is this
normal?<BR><BR>Does anybody have any ideas about what
I'm doing wrong? I'm pretty sure it's<BR>something
minor...<BR><BR>Thanks.<BR><BR>Andrej<BR><BR><BR>I'm
working with Struts 1.1b1 with Tomcat 4.0.4 under
Win2k.<BR><BR><!-- bottom of struts-config.xml
--><BR><PLUG-IN
className="org.apache.struts.validator.ValidatorPlugIn"><BR><SET-PROPERTY
value="/WEB-INF/validator-rules.xml"
property="pathname" /><BR><SET-PROPERTY
property="pathname"
<br>value="/WEB-INF/slb-validator-rules.xml"/&gt;<BR><SET-PROPERTY
value="/WEB-INF/validation.xml" property="pathname"
/><BR></PLUG-IN><BR><BR><!-- validation.xml
--><BR><FORM-VALIDATION><BR><FORMSET><BR>
<FORM name=baseFluidForm><BR><FIELD property="name"
<br>depends="required"&gt;<BR><ARG0 key="name"
/><BR></FIELD><BR><FIELD property="density"
<br>depends="required,float"&gt;<BR><ARG0
key="density" /><BR></FIELD><BR><FIELD
property="concentration"
<br>depends="required,float"&gt;<BR><ARG0
key="concentration"
/><BR></FIELD><BR></FORM><BR></FORM><BR></FORMSET><BR></FORM-VALIDATION><BR><BR><BR><BR><BR>--<BR>To
unsubscribe, e-mail:
<MAILTO:[EMAIL PROTECTED]><BR>For
additional commands, e-mail: 
<MAILTO:[EMAIL PROTECTED]><BR></BLOCKQUOTE></MAILTO:[EMAIL PROTECTED]></MAILTO:[EMAIL PROTECTED]>

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to