front.phone v4.17.9

A Javascript library that identifies, validates and formats phone numbers.

See project on GitHub Download

Full installation instructions and documentation on GitHub.

Countries Supported

  • American Samoa
  • Argentina
  • Australia
  • Bolivia
  • Brazil
  • Canada
  • Czech Republic
  • Chile
  • Colombia
  • Costa Rica
  • Ecuador
  • France
  • Greece
  • Guam
  • Guatemala
  • India
  • Indonesia
  • Iraq
  • Italy
  • Korea
  • Mexico
  • New Zealand
  • Northern Mariana Islands
  • Panama
  • Paraguay
  • Peru
  • Puerto Rico
  • Romania
  • Saudi Arabia
  • Singapore
  • Slovakia
  • Spain
  • U.S. Virgin Islands
  • United Arab Emirates
  • United Kingdom
  • Uruguay
  • USA
  • Venezuela
  • Add your own!

API

Get Phone Info  Phone.getPhoneInternational(number)

Read more about how to get info of the phone number

Result

{{ getInfo.result }}

Format  Phone.format(frontPhoneObject, formatType)

Read more about how to format a phone number

Result

International Format

{{ format.value | phone:'international' }}

National Format

{{ format.value | phone:'national' }}

Local Format

{{ format.value | phone:'local' }}

Validate  Phone.validate(number)

Read more about how to validate a phone number

Result

{{ validate.result }}

AngularJS Support

{{ '552189898989' | phone:'international' }}
{{ '552189898989' | phone:'national' }}
{{ '552189898989' | phone:'local' }}
{{ '2189898989' | phone:'international':55 }}
{{ '2189898989' | phone:'national':55 }}
{{ '2189898989' | phone:'local':55 }}