front.phone v4.8.0

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

See project on GitHub Download

Full installation instructions and documentation on GitHub.

Countries Supported

  • Argentina
  • Bolivia
  • Brazil
  • Canada
  • Chile
  • Colombia
  • Costa Rica
  • Ecuador
  • France
  • Guatemala
  • Korea
  • Mexico
  • Panama
  • Paraguay
  • Peru
  • Spain
  • Uruguay
  • United Kingdom
  • 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 }}