You can write java validation Try like this in xml
<validator type="fieldexpression"> <param name="fieldName"> FirstName </param> <param name="expression"><![CDATA[FirstName!=null && LastName!=null && Company!=null]]></param> <message key="should.not.be.empty"/> </validator> Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -----Original Message----- From: Burton Rhodes [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2008 9:06 PM To: Struts Users Mailing List Subject: Advanced Struts 2 Validation Question... How do I use validation in an [Action]-validation.xml file to validate several fields? I need to implement the following logic for 3 fields on a form: Company, FirstName, LastName. Psedo Code: If Company empty, then FirstName and LastName must be filled If FirstName and LastName empty, then Company Must be filled. I am having trouble seeing how this can be accomplished with the "expression" validator type. Or should I just write some simple javascript to make this happen?! Thanks!! Burton --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]