Phil K
Phil K

Reputation: 5359

Telephone input which requires country calling code

Is there a HTML form input which accepts only telephone numbers prefixed with a country code e.g. +44 for Great Britain, +359 for Bulgaria?

Upvotes: 1

Views: 19465

Answers (3)

sunviwo
sunviwo

Reputation: 123

Use this jQuery plugin which is fantastic for those cases.: http://www.jqueryscript.net/form/jQuery-International-Telephone-Input-With-Flags-Dial-Codes.html

Upvotes: 2

mpakbaz
mpakbaz

Reputation: 496

I do know that you can simply do it using javascript, however if you are developing using asp .net, you may use validation controls.

Upvotes: 0

Raheel Hasan
Raheel Hasan

Reputation: 6013

why dont you divide the field into 2 fields: country-code (a dropdown with prefix like +44, +359 etc); and a regular number field with remaining of the phone number.

Upvotes: 3

Related Questions