Whenever I used the 'required' pluggable validator to validate a field, the
other types of validations (eg., 'mask', 'minlength', etc.) are ignored if
the 'required' validator is tripped.  Is this normal behavior?

 

What I mean is, if I have these form validations,

 

       <form name="someform">

        <field property="wireLimit"

               depends="required, float">

          <arg0 key="authorityLevelForm.wireLimit.displayname"/>

        </field>

        <field property="comments"

               depends="maxlength">

          <arg0 key="wireTransferForm.comments.displayname"/>

          <arg2 name="maxlength"

                key="${var:maxlength}"

                resource="false"/>

          <var>

            <var-name>maxlength</var-name>

            <var-value>175</var-value>

          </var>

        </field>

        </form>

 

then I'm saying, "'wireLimit' is required, and 'comments' must be under 175
characters".  If the user fails to supply a value for 'wireLimit' and also
exceeds the 175 character limit on 'comments', then she has failed two
validations, and both messages should show up.  What happens though, is only
the message for the 'required' field shows up.  If she then corrects the
error for the required field (fills in a value) and clicks 'Submit', she now
sees the error message for 'maxlength'.  This is really confusing for the
user!  It only seems to happen when 'required' fields are used.  Has anyone
else seen this?  This is struts-validator 1.0, by the way, with Struts 1.0
(not 1.1).


Thanks!

David

 

David A. Ventimiglia

Wells Fargo Private Client Services

(415) 396-0414 (work)

 

Reply via email to