Not sure if you are using a form bean or a dynaactionform. But, specify a String type field and then validate the string and convert to numeric.
Mike -----Original Message----- From: Nandita Rajagopalan [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:47 PM To: [EMAIL PROTECTED] Subject: Newbie to struts with a question on text fields Hi, I have a textbox which is supposed to hold a numeric value - ie the property corresponds to a numeric datatype in the Action form. If I leave this textbox empty , I want my validate method to catch it and print an error as this field is a required field. However, when I leave this text empty, a value of 0 gets placed in the property's value . 0 is an allowed value and hence no error gets dumped. How do I get around this problem ? 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]