I am validating using validator and working on Struts 1.1
-----Original Message----- From: Axel Seinsche [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 7:24 PM To: Struts Users Mailing List Subject: Re: validation for optional fields Kalra, Ashwani wrote: >hi, >how can I validate an optional field. ie validate only if there is some >value in it. For example. I want to validate a field which should of type >int.But it should be validated only if use has entered some value in it. > > hi, if you are validating in your form or action class you can check if the field is not empty (!= null or !equals("") and then check for correct int value. Axel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Our name has changed. Please update your address book to the following format: "[EMAIL PROTECTED]". This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]