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!

[1870 byte] By [fotosinteezea] at [2007-11-27 7:10:11]
# 1
Any particular reason why you aren't asking this at some Struts forum, where Struts experts might be?
CeciNEstPasUnProgrammeura at 2007-7-12 19:01:40 > top of Java-index,Java Essentials,Java Programming...
# 2
Actually - no! Ok - THX, i will try
fotosinteezea at 2007-7-12 19:01:40 > top of Java-index,Java Essentials,Java Programming...