That worked perfectly. Thank you! -----Original Message----- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 31, 2006 8:26 AM To: Struts Users Mailing List Subject: Re: Valid When Question
Maybe something like the following.... <field property="phone1" depends="validwhen"> <var> <var-name>test</var-name> <var-value>((*this* != null) or ((phone2 == null) and (phone3 == null)))</var-value> </var> </field> <field property="phone2" depends="validwhen"> <var> <var-name>test</var-name> <var-value>((*this* != null) or ((phone1 == null) and (phone3 == null)))</var-value> </var> </field> <field property="phone3" depends="validwhen"> <var> <var-name>test</var-name> <var-value>((*this* != null) or ((phone1 == null) and (phone2 == null)))</var-value> </var> </field> Niall ----- Original Message ----- From: "Kalcevich, Daniel" <[EMAIL PROTECTED]> To: <user@struts.apache.org> Sent: Tuesday, January 31, 2006 4:06 PM Subject: Valid When Question Everyone, I have a question regarding the Valid When. I have 3 fields for phone number (declared as phone1, phone2, phone3). Now, the field as a whole is not required, however, if a user enters in some data, I want to make sure they enter in values for all 3. So, on a validWhen I would want the logic to be "its required when data is entered in either of the other two fields". Can someone give any advice into how I can declare this in my validator XML file? Thanks. Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]