bool Validate_AU::phoneNumber (
string $number
, int $flags = VALIDATE_AU_PHONENUMBER_NATIONAL
)
Note that this function supports the following notations:
Landline: 03 9999 9999
Mobile: 0400 000 000 (as above, but usually notated differently)
Indial: 131 812 / 1300 000 000 / 1800 000 000 / 1900 000 000
International: +61.3 9999 9999
For International numbers, only +61 will be valid, as this is Australia's dial code, and the format MUST be +61.3, where 3 represents the state dial code, in this case, Victoria.
Note: If the VALIDATE_AU_PHONENUMBER_STRICT flag is not supplied, then all spaces, dashes and parenthesis are removed before validation. You will have to strip these yourself if your data storage does not allow these characters.
$number
The telephone number
$flags
Can be a combination of the following flags:
VALIDATE_AU_PHONENUMBER_STRICT: if supplied then no spaces, parenthesis or dashes (-) will be removed.
VALIDATE_AU_PHONENUMBER_NATIONAL: when supplied valid national numbers (eg. 03 9999 9999) will return TRUE.
VALIDATE_AU_PHONENUMBER_INDIAL: when supplied valid indial numbers (eg. 13/1300/1800/1900) will return TRUE.
VALIDATE_AU_PHONENUMBER_INTERNATIONAL: when supplied valid international notation of Australian numbers (eg. +61.3 9999 9999) will return TRUE.
todo Check that $flags contains a valid flag.
throws no exceptions thrown
This function can not be called statically.