You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by thomas Sontheimer <th...@artal.fr> on 2004/03/03 18:10:39 UTC

validating double causes no error on text entry

when I use the validator on the server side to validate a double the
value is converted to 0.0 an no error is reported.
has anyone meet that problem?
I parsed the struts and commons bugzilla lists and didn't found anything
about.

thanks

thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE : RE : validating double causes no error on text entry[RESOLVED]

Posted by thomas Sontheimer <th...@artal.fr>.
the problem came from the java.lang.Double field of my DynaValidatorForm
which converted first any string in an empty string.
instead I use a java.lang.String field that I convert myself after
validation and it works.

> -----Original Message-----
> From: thomas Sontheimer [mailto:thomas.sontheimer@artal.fr] 
> Sent: Thursday, March 04, 2004 9:44 AM
> To: 'Struts Users Mailing List'
> Subject: RE : validating double causes no error on text entry
> 
> 
> the problem is that the string is NOT empty but it validate 
> it as an empty string.
> 
> > -----Original Message-----
> > From: John Fitzpatrick [mailto:john@vitarara.net]
> > Sent: Wednesday, March 03, 2004 6:51 PM
> > To: Struts Users Mailing List
> > Subject: Re: validating double causes no error on text entry
> > 
> > 
> > "Casting" an empty String to a double will give you 0.0.
> > 
> > 
> > On 20040303 12:10 PM, "thomas Sontheimer" 
> <th...@artal.fr>
> > wrote:
> > 
> > > when I use the validator on the server side to validate a
> > double the
> > > value is converted to 0.0 an no error is reported. has anyone meet
> > > that problem? I parsed the struts and commons bugzilla lists and 
> > > didn't found anything about.
> > > 
> > > thanks
> > > 
> > > thomas
> > > 
> > > 
> > > 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE : validating double causes no error on text entry

Posted by thomas Sontheimer <th...@artal.fr>.
the problem is that the string is NOT empty but it validate it as an
empty string.

> -----Original Message-----
> From: John Fitzpatrick [mailto:john@vitarara.net] 
> Sent: Wednesday, March 03, 2004 6:51 PM
> To: Struts Users Mailing List
> Subject: Re: validating double causes no error on text entry
> 
> 
> "Casting" an empty String to a double will give you 0.0.
> 
> 
> On 20040303 12:10 PM, "thomas Sontheimer" <th...@artal.fr>
> wrote:
> 
> > when I use the validator on the server side to validate a 
> double the 
> > value is converted to 0.0 an no error is reported. has anyone meet 
> > that problem? I parsed the struts and commons bugzilla lists and 
> > didn't found anything about.
> > 
> > thanks
> > 
> > thomas
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: validating double causes no error on text entry

Posted by John Fitzpatrick <jo...@vitarara.net>.
"Casting" an empty String to a double will give you 0.0.


On 20040303 12:10 PM, "thomas Sontheimer" <th...@artal.fr>
wrote:

> when I use the validator on the server side to validate a double the
> value is converted to 0.0 an no error is reported.
> has anyone meet that problem?
> I parsed the struts and commons bugzilla lists and didn't found anything
> about.
> 
> thanks
> 
> thomas
> 
> 
> ---------------------------------------------------------------------
> 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