Hello! 
I'm trying to validate a form in which there are two checkboxes. the validation must 
succeed if at least one of them is checked (i.e. fails if none of them is checked). I 
know validwhen would be the solution, but I have to use Struts 1.2's requiredif. 

<field property="field1" depends="requiredif">
  <var><var-name>field[0]</var-name><var-value>field2</var-value></var>
  <var><var-name>fieldTest[0]</var-name><var-value>EQUAL</var-value></var>
  <var><var-name>fieldValue[0]</var-name><var-value>false</var-value></var>
</field> 

<field property="field2" depends="requiredif">
  <var><var-name>field[0]</var-name><var-value>field1</var-value></var>
  <var><var-name>fieldTest[0]</var-name><var-value>EQUAL</var-value></var> 
  <var><var-name>fieldValue[0]</var-name><var-value>false</var-value></var>
</field>
field1 and field2 are two checkboxes. (two booleans in the validatorForm)

I suppose that what I really need is a "maskif" rule ;-)....
has anyone an idea?

Thanks, and happy New Year !

Caroline

Reply via email to