struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From natalia_ <nstavi...@cidc.com>
Subject validation: fieldexpression doesn't get executed if stringlength validation fails
Date Fri, 15 Aug 2008 19:19:42 GMT

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>
-- 
View this message in context: http://www.nabble.com/validation%3A-fieldexpression-doesn%27t-get-executed-if-stringlength-validation-fails-tp19004155p19004155.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message