I have following input for accepting mobile number. But I think it will not work world wide. It will work for Indian mobile numbers only.(e.g. +910123456789)(+91 country code for India, 0 to 9 mobile number in India)

How to make it global using pattern=" \+ [] {}"?
I want extension of country so I have added +. How to make it work?

<input type="tel"   size="40"  name="phone" placeholder="Mobile: +911234567890" pattern="\+[0-9]{12,12}" autocomplete="off"  required/>
3 Years
Discussion Span
Last Post by vizz

I don't know the exact phone number digit range for each country. But in my code, which is working for Indian phone numbers, range is 10 digits.
e.g. +91 0123456789

How to make changes to accept phone numbers world wide? I want to make it available for all countries.


How to make changes to accept phone numbers world wide?

First figure out what the possible ranges are. Then you can just adjust the {12,12} part.


I have all country codes, {12,12} this works fine for Indian numbers. But how to set it for 3 or 4 digit country codes?

Czech Republic:- 420, Bermuda:-1 441

All countries have different mobile number digit range, where can I find all exact ranges? I found all country codes easily, but mobile number range is little confusing, how to find exact ranges?

Or simply what range should I set for {12,12} to accept all numbers?


Now I have this pattern pattern="\+\d{2}\ \d{3}\ \d{10}" will this work world wide?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.