Scott Mebberson

Icon

Web Technologist

Australian Mobile Phone Validator for Flex

Flex comes with a bunch of great validators built-in. You can use them for the majority of your data validation needs. However, for us Australians, the PhoneNumberValidator doesn’t work if you want to ensure users provide valid Australian mobile numbers.

Like the US our mobile numbers need to be 10 digits long, but Australian mobile numbers must start with 04.

I’ve used this in a number of projects and decided to break it out as an example of extending the Validator class to write your own validation routines. You can download the source (including the Unit test) from the example page.


Filed under: flex

Leave a Reply