You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Duma Rolando <r....@urmetsistemi.it> on 2004/03/19 09:01:45 UTC
DynaValidatorForm for java.lang.Integer
Hi all,
I have a problem using Validator with DynaBeans.
In my struts-config if I declare java.lang.String props for a
DynaValidatorForm a "required" validation works fine, but if I change the
props to java.lang.Integer the "required" validation fails ( no ActionErrors
returned ).
Please hep me!
I'm using struts 1.1, validator 1.0.2, commons-beanutils 1.6.1 ( maybe this
is the problem? ) on tomcat 5.1.19.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: DynaValidatorForm for java.lang.Integer
Posted by Mark Lowe <ma...@talk21.com>.
Use String. Anything else is asking of trouble. According to the party
line (ref: struts dev list) action form properties should always be of
type string.
You can still validate whether a string is "1" for example or whether
it looks like a date whatever, it doesn't have to be typed as such.
On 19 Mar 2004, at 09:01, Duma Rolando wrote:
> Hi all,
> I have a problem using Validator with DynaBeans.
> In my struts-config if I declare java.lang.String props for a
> DynaValidatorForm a "required" validation works fine, but if I change
> the
> props to java.lang.Integer the "required" validation fails ( no
> ActionErrors
> returned ).
> Please hep me!
> I'm using struts 1.1, validator 1.0.2, commons-beanutils 1.6.1 ( maybe
> this
> is the problem? ) on tomcat 5.1.19.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org