function valid_pa_phone_number in Phone 7
Same name and namespace in other branches
- 6 phone.pa.inc \valid_pa_phone_number()
Verifies that $phonenumber is a valid nine-digit Panamanian phone number
Parameters
string $phonenumber:
Return value
boolean Returns boolean FALSE if the phone number is not valid.
File
- include/
phone.pa.inc, line 40 - CCK field for Panamanian phone numbers
Code
function valid_pa_phone_number($phonenumber) {
//$phonenumber = trim($phonenumber);
// define regular expression
// return true if valid, false otherwise
return (bool) preg_match(PHONE_PA_REGEX, $phonenumber);
}