sorry, i have no experience with struts2. I only use classic struts: http://struts.apache.org/1.3.8/faqs/validator.html
Maybe you can create your own validwhen validator rule in struts2. I integrated commons validator in my own project and i reused some struts validwhen code. Validwhen uses antlr for parsing the syntax. I had been thinking using rhino (mozilla javascript engine) or beanshell, but validwhen was very easy. but ... why don't you override the validate method in your formbean? are you using a dynactionform or a simple formbean class? El mar, 11-09-2007 a las 17:28 +0200, Pablo Vázquez Blázquez escribió: > Hola Jorge, > > I think there is not a "validwhen" validator, either... > > Any idea? Thanks. > > Jorge Martín Cuervo escribió: > > try validwhen validation rule. It exists in struts, maybe exists too in > > struts2. > > > > El mar, 11-09-2007 a las 16:27 +0200, Pablo Vázquez Blázquez escribió: > > > >> 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] > -- ____________________________________ Jorge Martin Cuervo Outsourcing Emarketplace deFacto Powered by Standards email <[EMAIL PROTECTED]> voice +34 985 129 820 voice +34 660 026 384 ____________________________________ DE FACTO STANDARDS, S.L., le informa que su dirección de correo electrónico, así como el resto de los datos de carácter personal que nos facilite, serán objeto de tratamiento automatizado en nuestros ficheros, con la finalidad del envío de información comercial y/o personal por vía electrónica. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica de Protección de Datos de Carácter Personal (LOPD. 15/1999), dirigiendo un escrito a C/ Gutiérrez Herrero (Centro De Empresas 'La Curtidora'), 52 - oficina 207 - 33402 AVILES (Asturias), o a nuestra dirección de correo electrónico ([EMAIL PROTECTED]). También informamos que la información incluida en este e-mail es CONFIDENCIAL, siendo para uso exclusivo del destinatario arriba mencionado. Si Usted lee este mensaje y no es el destinatario indicado, le informamos que está totalmente prohibida cualquier utilización, divulgación, distribución y/o reproducción de esta comunicación sin autorización expresa en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos nos lo notifique inmediatamente por esta misma vía y proceda a su eliminación. This e-mail contains information that will be added to our computerised guest data base and will be trated in the strict confidence. If you wish to access, correct, oppose or cancel your details, as specified the Law 15/99, December 13th, please send a certified letter to this effect to DE FACTO STANDARDS, S.L.., (C/ Gutiérrez Herrero (Centro De Empresas 'La Curtidora'), 52 - oficina 207 33402 AVILES (Asturias) SPAIN). If you read this message, and is not the destinatary, we informal you that is forbidden anything utility, distribution, divulgation or reproduction of this communication without express authorization, of the present law. If you received this message for mistake, we proud in order to the present law, immediate communication to us, and please erase this e-mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]