Skip to contentSkip to navigationSkip to topbar

International Telephone Input Validation

Created by: Twilio
  • Verify
  • JavaScript
  • Quick Deploy

This project will show you one way to validate phone number inputs with the intl-tel-input(link takes you to an external page) plugin and Twilio's Lookup API(link takes you to an external page). For a production use case we recommend adding phone verification(link takes you to an external page), which is a best practice for collecting phone numbers from your users in order to make sure they have control of the number.

phone number input translated to e.164 format.

How it works:

  1. User selects their country from the drop down and enters their phone number
  2. App validates phone number validity with the Twilio Lookup API(link takes you to an external page)
  3. App displays the phone number in E.164 format(link takes you to an external page)

For more information, check out this blog post on building international phone number input(link takes you to an external page).

Report this template(link takes you to an external page)
Quick Deploy to TwilioGet CodeUse Twilio CLI
Launch and test this app in a few minutes with Quick Deploy. No server needed. Quick Deploy will automatically configure and deploy this app using Twilio Functions. Learn more about Twilio Functions(link takes you to an external page)
  1. Log in to Twilio

    Access your Twilio account to get started.

    Checking for existing account...

  2. Click the button below to deploy your app

    This will use the details entered above to deploy your application to Twilio Functions.

    You will be able to view the application in the browser and edit it using the Functions UI.

Need some help?

We all do sometimes; code is hard. Get help now from our support team(link takes you to an external page), or lean on the wisdom of the crowd by browsing the Twilio tag(link takes you to an external page)on Stack Overflow.

Terms of servicePrivacy Policy

Copyright © 2025 Twilio Inc.