Many developers recommend that the ActionForm properties all be String, so that
validation can be done on just what the user typed, and so that any error
messages can display to the user exactly what s/he typed. Yes, the controller
can do conversions for you, but I never use that feature.

Will

----- Original Message -----
From: "Mike Dewhirst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 5:42 AM
Subject: form validation


How is it possible to validate input in struts for formatting?

What I mean is, is it possible to check when a string is entered into an
input field that populates an int? It seems that the Controller populates
the int with a 0, which makes it difficult to detect if this was an invalid
input, or a "real" 0.

Would we need to extend the framework if we want to be able to detect this?

Thanks for any advice!!



Reply via email to