struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julia Weaver <dreamweaver_...@yahoo.com>
Subject Re: validate numeric
Date Thu, 20 May 2004 14:36:26 GMT
Henrique,
Thank you! it works!


--- Henrique VIECILI <viecili@softplan.com.br> wrote:
> Hi Julia,
> 
> You can use javascript and/or server-side
> validation:
> 
> javascript:
> 
> isNaN(field.value); //verify if the value 'is not a
> number'
> 
> server side: (there are many ways)
> 
> try {
>     Double.parseDouble(getField());
> } catch (NumberFormatException nfe) {
>     // if this exception is thrown the value of the
> field is not a number
> }
> 
> 
> []s
> Henrique Andrade Viecili
>   ----- Original Message ----- 
>   From: Julia Weaver 
>   To: Struts Users Mailing List ;
> seandynan@bigfoot.com 
>   Sent: Thursday, May 20, 2004 9:56 AM
>   Subject: validate numeric
> 
> 
>   Hi,
> 
>   How can I validate the field user input in form
> bean
>   is not a numeric value? Is any function exist
> like: 
>   IsNumeric(x)?
> 
>   Thanks, 
> 
> 
> 
> 
>   __________________________________
>   Do you Yahoo!?
>   Yahoo! Domains - Claim yours for only $14.70/year
>   http://smallbusiness.promotions.yahoo.com/offer 
> 
>  
>
---------------------------------------------------------------------
>   To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
>   For additional commands, e-mail:
> user-help@struts.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Domains  Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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


Mime
View raw message