Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

jquery.phonenumber

Nice little jQuery plugin for using PhoneFormat.js

Provides phone number formatting for input element as user types. Uses Al Beebe's PhoneFormat.js which is built using Google's libphonenumber library.

Prerequisites

Make sure that both jQuery and PhoneFormat.js are loaded before using phoneNumber.js

Usage

$('input[type=tel]').phoneNumber({
    'format': 'local',
    'country': 'FI'
});

No formatting is made if country code is not specified. In this case only illegal characters are checked.

Options

###format

Phone number format must be one of the following:

  • local
  • international
  • e164

###country

A two-digit country code of the phone number, e.g. US

About

Nice little jQuery plugin for using PhoneFormat.js

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages