You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Ilja S." <il...@frontdesk.ee> on 2006/10/08 13:38:03 UTC

parsing numbers in input

Hi all
I have a form where user must enter a number - integer or double. 
Corresponding property of this field in actionForm is type of String.

I want user to be able to enter this number as normal number OR as 
localized number according to current Locale object (like 45,000,000.01 
or 45000000.01).
I could use a NumberFormat class in validate method to try to parse this 
  field.

Is this a normal practice at all to allow users to do this?

And why Validator framework has a date validation with pattern and has 
not number validation with pattern?

-- 
*************************************
Best Regards
Ilja


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