Hi,
   Here's a small problem that I'm facing. I have a
form which has an integer field, say a cost of some
item. Now, I need to do the validation for this
form-field to make sure that the user does not enter a
non-numeric data in this field. I have the form
containing this field as a primitive int. The problem
is that whenever a non-numberic value is entered the
value is reset to zero. This leads to two problems,
one it doesn't give me a chance to find out that the
user has entered a non-numeric value in my validate
method & secondly, I end up losing the value that the
user had entered & hence can't show him the value
back. The rather crude solution to this is to make the
numeric form-field value a String & do the check in
the validate() to find if a non-numeric value is
entered. But I'm not happy with this solution as it
requires me to decalre a field as string even when it
should have been an int or float ...

Is there any other way around this prob?

Thanx in advance,
VD.

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to