Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

validation: fieldexpression doesn't get executed if stringlength
validation fails

natalia_

2008-08-15

Replies: Find Java Web Hosting

Author LoginPost Reply

I want all validation on 2 fields to take place, I am not short-circuiting
any. But it looks like the behavior is such that if stringlength fails the
fieldexpression doesn't fire. Only if the field satisfies the length
requirement then I see the result of fieldexpression to appear. I tried to
put the fieldexpression before the stringlength, but that didn't change
anything.

<field name="account.loginName">
    <field-validator type="stringlength">
      3
      8
      <message key="validation.loginName.length">Login Name must be
between ${minLength} and ${maxLength} characters in length</message>
   </field-validator>

    <field-validator type="fieldexpression">
       
         account.loginName.equals(confirmLoginName)
       
       <message key="validation.loginName.doNotMatch">Login Name and
Confirm Login Name do not match</message>
    </field-validator>  
       
</field>

<field name="confirmLoginName">
    <field-validator type="stringlength">
      3
      8
      <message key="validation.confirmLoginName.length">Confirm Login
Name must be between ${minLength} and ${maxLength} characters in
length</message>
   </field-validator>
</field>
--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.