Hi all,
 
The validator package works well for me. 
But I'm trying to use the requiredif and failing.
 
I know there has been previous discussion of this, 
but I'm trying to a simple validation based on a checkbox 
so perhaps someone could tell me where I'm going wrong.
 
For example,
 
I want to validate a creditcard, if a checkbox is checked.
 
I currently am trying to do this as follows:
 
 
      <form name="myForm">
              <field property="creditCard"
                     depends="requiredif,creditCard">
 
                  <arg0 key="myForm.creditCard"/>
                  <arg0
                      name="creditCard"
                    key="CreditCard"
                      resource="false"
                  />
                  <arg0
                      name="requiredif"
                    key="A Credit-Card is"
                      resource="false"
                  />
                  <var>
                    <var-name>myForm.checked</var-name>
                    <var-value>on</var-value>
                  </var>
              </field>
      </form>
 
 
The form name is: myForm
 
The creditcard field is named "creditCard"
The checkbox field is named "checked"
 
Note that all other types of validation are working correctly for me.
 
Any help would be SO much appreciated.
Brian

Reply via email to