Must be a RAD prototype, right? ;)
On 04/02/2004 05:21 PM Paul Barry wrote:
The "greaterThan" validation I wrote fails if the number is not an
integer greater than 0, so I think I will just stick with that. This
allows me to still have the correct types for the properties in my
ActionForm.
Ad
The "greaterThan" validation I wrote fails if the number is not an
integer greater than 0, so I think I will just stick with that. This
allows me to still have the correct types for the properties in my
ActionForm.
Adam Hardy wrote:
Actually most of the Validator and the DynaActionForm functi
Actually most of the Validator and the DynaActionForm functionality is
based on the assumption that you are using String for the type.
Using an int in your action form leaves the possibility open that
someone will submit a non-int character, and then you will get an
Exception message in tomcat
validate is true. I wrote my own "greaterThan" validation to make sure
the property is greater than 0, which seems to work. I haven't looked
at how the validator works at all, but it seems that it checks the form
bean, not the request parameters, to validate the values. Is that the
case? If
Well, it's not the *expected* behavior.
First thing -- I'd make id a String. The validator parses String properties.
Not having looked into the validator code myself, I suppose "required"
*could* work for a non string property, but I sure wouldn't try it with a
primative like int. Integer might
5 matches
Mail list logo