Struts validator
Hi! I am interested is there a attribute like "maskif" in struts validator!
everything is work fine with "mask" and "requiredif" but there is really need for attribute "maskif", i have seen in one forum, that i can do something like that -
add just need to add the following attributes to my validation-rule.xml
<validator name="validif"
classname="validation.ValidIf"
method="validateValidIf"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.commons.validator.Validator"/>
<validator name="maskif"
classname="org.apache.struts.validator.FieldChecks"
method="validateMask"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
org.apache.commons.validator.Validator,
javax.servlet.http.HttpServletRequest"
depends="validif"
msg="errors.invalid"/>
and add validation in validation.xml and it will work
<field property="zipcode" depends="maskif">
<arg key="validWhenForm.lastName" />
<var>
<var-name>mask</var-name>
<var-value>^\d{5}$</var-value>
</var>
<var>
<var-name>check</var-name>
<var-value>(country=='US')</var-value>
</var>
</field>
but itDOESN'T :(
even more, if i add following lines to validation and validation-rules
the attributes "required, date, mask.. etc. " doesn't work any more!
So is there really attribute "maskif" and maybe someone could could help out with this one!
Thx!

