You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nagendra Kumar O V S <na...@ikigo.com> on 2003/07/21 11:32:16 UTC
validator sequence execution
hI,
i have something like this my validation.xml
<field property="cwbPrice" depends="required,float,floatRange
mask">
<arg0 key="cwbPrice.displayname"/>
<arg1 name="floatRange" key="${var:min}" resource="false"/>
<arg2 name="floatRange" key="${var:max}" resource="false"/>
<msg key="errors.maskTwoDecimals" name="mask"/>
<var>
<var-name>mask</var-name>
<var-value>^\d{1}*(.\d{1,2})?$</var-value>
</var>
<var>
<var-name>min</var-name>
<var-value>1.00</var-value>
</var>
<var>
<var-name>max</var-name>
<var-value>999999.99</var-value>
</var>
</field>
but the execution order in my jsp is
return validateMask(form) && validateRequired(form) &&
validateInteger(form) && validateFloat(form) && validateIntRange(form) &&
validateFloatRange(form);
it is validating "mask" at the first place though i have mentioned it in the
last. is it the way the validator works or can i mention the sequence
elsewhere
TIA
--nagi
Nagendra Kumar O V S
Member Technical Staff
Ikigo India Private Ltd.
470-B, Road No. 36,
Jubilee Hills,
Hyderabad 500033
Contact(O): 23544671
Cell: 98482-41789