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

markus_petrux’s picture

Category: bug » feature
Status: Active » Fixed

Yes, 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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.