How to validate all countries phone numbers using jQuery

Earlier I had posted about "Validate phone numbers using jQuery" but that code just validates for valid input, it doesn't check for format of phone number. But recently a jQuery plugin named "International Telephone Input"is released which validates all the international phone numbers along with country code.

International Telephone Input jQuery plugin for entering international telephone numbers. It adds a flag dropdown to any input, which lists all the countries and their international dial codes next to their flags.

You may also like:


  • In the country dropdown you can navigate by typing, or using the up/down keys
  • Selecting a country from the dropdown will update the dial code in the input
  • Typing a different dial code automatically updates the displayed flag
  • Country names in the dropdown also include localised versions in brackets
  • Lots of initialisation options for customisation, as well as public methods for interaction

How to use it?

To use this plugin, all you need to do is to download the latest version and then link the required stylesheet and reference to plugin library.
<link rel="stylesheet" href="build/css/intlTelInput.css">
Add the plugin script and initialise it on your input element
<input type="tel" id="mobile-number">

<script src="//"></script>
<script src="build/js/intlTelInput.min.js"></script>


  • Validation:
    Use Google's libphonenumber for validation
  • Lookup user's country:
    Use IP address lookup to set the default country to the user's country
  • Country sync:
    Access the country data to create a separate country dropdown for an address form, and then listen for change events to keep the two dropdowns in sync
  • European countries:
    Only show European country codes
  • Styling:
    Displays the two different styling settings
  • Modify country data:
    Modify the data to only show localised country names

This jQuery plugins also provides options for customization like for setting default country, dial code delimiter and many more. You can visit the official website for more information.

Official Website
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..