I don't know much about s1 validation, so I cannot do exactly what you did in s1. Here is the validator I use for s2 to make sure field 2 is required when field1 has value. You can use the expression validator most of the time. Hope it helps.
<validator type="expression"> <param name="expression"> field1 == null || field2 != null </param> <message> field 2 is required when field 1 is not null</message> </validator> -----Original Message----- From: j alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 11, 2007 4:28 PM To: Struts Users Mailing List Subject: Re: [S2] validation issue The fieldexpression validator would handle most dependent checks, but i think there's no out-of-the-box solution if we want the expression to act as a guard condition alone and not as a validation. Please check the archives for comments on this. -Joseph On 9/11/07, Jiang, Jane (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote: > > Did you look into expression validator? > > -----Original Message----- > From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 11, 2007 10:28 AM > To: Struts Users Mailing List > Subject: [S2] validation issue > > Hi all! > > I´m trying to validate two fields that depends on another field. > > What I was doing in S1 is (for field "in"): > > <field property="in" depends="requiredif"> > <msg name="validwhen" > key="ErrorMessages.applicationIdRepresent.sameReference"/> > <arg position="0" key="ProcessorHTTPDetails.in"/> > <msg name="mask" key="ProcessorHTTPDetails.in.help"/> > <var> > <var-name>field[0]</var-name> > <var-value>editParams</var-value> > </var> > <var> > <var-name>fieldTest[0]</var-name> > <var-value>NOTNULL</var-value> > </var> > </field> > > But now in S2, there is no "requiredif" validator :( > > Any idea about how can I do to get the same validation effect? > > Thanks. > > > --------------------------------------------------------------------- > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]