Hello, I have a form that contains two fields: id & lastName. The rule is that if I can only enter in one or the other, not both. I am trying to use the ValidWhen to perform this check. I have code similar to the following:
<form name="searchForm"> <field property="id" depends="validwhen,minlength,mask,validateId"> <msg name="minlength" key="errors.policyNumber.length"/> <msg name="mask" key="errors.policyNumber.mask"/> <arg0 key="searchForm.policyNumberRequired"/> <arg1 name="minlength" key="${var:minlength}" resource="false"/> <var> <var-name>test</var-name> <var-value>((lastName == null) and (*this* != null))</var-value> </var> <var> <var-name>minlength</var-name> <var-value>10</var-value> </var> <var> <var-name>mask</var-name> <var-value>^[a-zA-Z0-9]*$</var-value> </var> </field> <field property="lastName" depends="validwhen"> <msg name="validwhen" key="errors.lastName.entry"/> <var> <var-name>test</var-name> <var-value>((id == null) and (*this* != null))</var-value> </var> </field> </form> When I enter in only a value into the "id" field, I still get the message "Please enter a last name". That message is the key "errors.lastName.entry". Any ideas on what else I need to do to get this working? I am using version 1.2.1. Thanks in advance. -Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]