You are here

function valid_hu_phone_number in Phone 7

Same name and namespace in other branches
  1. 6 phone.hu.inc \valid_hu_phone_number()

Verifies that $phonenumber is a valid nine-digit Hungarian phone number

Parameters

string $phonenumber:

Return value

boolean Returns boolean FALSE if the phone number is not valid.

File

include/phone.hu.inc, line 23
CCK Field for Hungarian phone numbers.

Code

function valid_hu_phone_number($phonenumber) {
  $phonenumber = trim($phonenumber);

  // return true if valid, false otherwise
  return (bool) preg_match(PHONE_HU_REGEX, $phonenumber);
}