You are here

function ca_formatter_default in Phone Number 6

Same name and namespace in other branches
  1. 7 includes/phone.ca.inc \ca_formatter_default()

Default formatter for international phone number.

Parameters

$element: $element['#item']['country_codes']: alpha-2 country code $element['#item']['number']: phone number

$error: The error message to shown to user. Available parameters to use in the error message are

  • "%countrycode": the alpha-2 CC
  • "%phone_input": the original number input by user (could be invalid)
  • "%max_length": allowed maximum length of the phone number

Return value

boolean TRUE if it is a valid phone number for that country, FALSE otherwise.

File

includes/phone.ca.inc, line 53
CCK Field for Canada phone numbers.

Code

function ca_formatter_default($element) {
  return us_formatter_default($element);
}