Closed (fixed)
Project:
Format Number API
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 May 2009 at 07:44 UTC
Updated:
19 May 2009 at 08:30 UTC
The parse_formatted_number function strips out thousands separators irrespective of their position. If a thousands separator is not at a 3/6/etc position, it should not be valid, and probably the function should return false.
See also the feature request for a validate_formatted_number function.
Comments
Comment #1
markus_petrux commentedYes, that's because I implemented the validation using lenient parsing method as it's recommended by the Unicode Consortium. Please, see Unicode Locale Data Markup Language (LDML):
http://www.unicode.org/reports/tr35/tr35-11.html#Lenient_Parsing
I'm not convinced a more strict method should be applied as it may become really annoying. But maybe other prefer as you suggest, so I would accept a patch that offers a more strict validation as a new option for the "Number format" section at site and user levels. Please, feel free to re-open if you can provide a patch. Thanks