/    Sign up×
Community /Pin to ProfileBookmark

telephone number validation

Hello people

Does anyone have any ideas how i would validate a telephone number using php to make sure that the user fills in correct digits etc.

Stuart

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@felgallSep 13.2007 — Just remember that different parts of the world have different numbers of digits for the country code (between 1 and 3) , area code (between 1 and 6), phone number (between 3 and 8) and extension (between 0 and 6).

The lengths may vary more than that but I know of places where the lengths vary at least that much from the standard two digit country code, one digit area code and eight digit phone numbers that we use here.
Copy linkTweet thisAlerts:
@gizmoSep 14.2007 — Also remember people can present their number in various styles. In the UK for example we could have 0044 1283 xxxxxx, 01283xxxxxx, +44(0)1283 xxx xxx all for the same number. I have some code I used to convert all to the same style, but that isn't the answer to your question. I don't think that there is one to cater for all countries.
×

Success!

Help @stu007_uki spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...