In the Struts User Guide there is a large example with indexed properties. http://jakarta.apache.org/struts/userGuide/dev_validator.html
PS: I spend today resurrecting an old programmatical validation from a previous project. -- Peter Pilgrim, Struts/J2EE Consultant, RBoS FM, Risk IT Tel: +44 (0)207-375-4923 > -----Original Message----- > From: Wendy Smoak [mailto:[EMAIL PROTECTED]] > Sent: 30 January 2003 17:41 > To: 'Struts Users Mailing List' > Subject: RE: [VALIDATOR] requiredif ?? > > > > I'm Still struggling with requiredif... there doesn't seem to > be a working > example of it included with 1.1b3. I've gone through the > documentation and > come up with this. I'm trying to say that address is required only if > 1. prospect is null > 2. prospectNameOrId is not null > 3. action is not equal to "Add Prospect" > > <field property="address" depends="requiredif"> > <arg0 key="label.prospect.address"/> > <var> > <var-name>field[0]</var-name> > <var-value>prospect</var-value> > </var> > <var> > <var-name>field-test[0]</var-name> > <var-value>NULL</var-value> > </var> > <var> > <var-name>field[1]</var-name> > <var-value>prospectNameOrId</var-value> > </var> > <var> > <var-name>field-test[1]</var-name> > <var-value>NOTNULL</var-value> > </var> > <var> > <var-name>field[2]</var-name> > <var-value>action</var-value> > </var> > <var> > <var-name>field-test[2]</var-name> > <var-value>NOTEQUAL</var-value> > </var> > <var> > <var-name>field-value[2]</var-name> > <var-value>Add Prospect</var-value> > </var> > <var> > <var-name>field-join</var-name> > <var-value>AND</var-value> > </var> > </field> > > Thanks, > > -- > Wendy Smoak > Applications Systems Analyst, Sr. > Arizona State University PA Information Resources Management > ******************************************************************** Visit our Internet site at http://www.rbsmarkets.com This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorised to retain, read, copy or disseminate this message or any part of it. The Royal Bank of Scotland plc is registered in Scotland No 90312 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Regulated by the Financial Services Authority ******************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]