Try this

 <arg1
                      name="requiredif"
                      key="A name is"
                      resource="false"
                  />


> ----------
> From:         Brian McSweeney[SMTP:[EMAIL PROTECTED]
> Reply To:     Struts Users Mailing List
> Sent:         Wednesday, June 11, 2003 9:36 PM
> To:   Struts Users Mailing List
> Subject:      Help with requiredif validation
> 
> Hi all,
> 
> I'd like to use requiredif to validate some fields as follows:
> 
> on my jsp I have a checkbox, eg "supplier",
> 
> if this checkbox is checked, then I want another field, eg "name" to be
> required.
> I've tried to set this up in my validation.xml file as follows:
> 
>               <field property="name"
>                      depends="requiredif">
> 
>                   <arg0 key="validateForm.name"/>
>                   <arg0
>                       name="requiredif"
>                       key="A name is"
>                       resource="false"
>                   />
>                   <var>
>                     <var-name>validateForm.supplier</var-name>
>                     <var-value>true</var-value>
>                   </var>
> 
> however it doesn't seem to be working at all.
> Any ideas?
> thanks,
> Brian
> 
> PS - other fields are being validated correctly.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to