incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciek Sakrejda <>
Subject Re: Other locales for Flex SDK
Date Tue, 14 Feb 2012 17:56:39 GMT
> Are you writing an actionscript formatter for this, or are you just
> trying to tackle how to format it in the locale properties?

The Flex SDK localization includes format strings for phone number
formatting and validation, namely:

# PhoneFormatter
# formatString
phoneNumberFormat=(###) ###-####
validPatternChars=+()#- .

# PhoneNumberValidator
phoneNumberValidatorAllowedFormatChars=-()+ .

# PhoneNumberValidator

invalidCharErrorPNV=Your telephone number contains invalid characters.
wrongLengthErrorPNV=Your telephone number must contain at least {0} digits.

I think these are a simple, incorrect solution to a complex problem
(the validator requires ten digits but the formatter supports numbers
with only seven?), but it'd be nice to have some localized
functionality here, even if it's a little wonky.

> I'd suggest writing a custom PhoneNumberUKFormatter or something if you're
> not already.

That's not exactly a scalable localization strategy...

I would suggest settings that allow as many valid variations as
possible (nothing more fun than having your personal details deemed
invalid by a form) even at the cost of false negatives, and a single
version for formatting.

View raw message