What can I do to comprehensively validate an Australian Phone Number? I need this for an application I'm writing. You can assume it is dialed from within Australia. I want to use a white-list approach.
Here are my rules so far (after removing any whitespace):-
- Starts with 13 and is 6 digits long
- Starts with 1300 and is 10 digits long
- Starts with 0 (but not 0011 as this is international dialing) and is 10 digits long
- Starts with +61 followed by 9 digits
- Starts with (0_) followed by 8 digits (where _ is 1-9)
Is there anything I have missed?
Area codes are required as we may be sending a fax from our fax server in one state when the user is in a different state.
(I'm not asking how to make a regexp out of the above rules, but if those rules are correct).
See also:
UK Phone Numbers
US Phone Numbers