telephone validation

mdma 21 Sep, 2015
Hello Bob,

i am very curious about telephone field:

we have here tel like:

+43 9999 9999
0043 9999 9999
043 9999 9999
0662 999999
+43 663 999999

how would this be configured to vaidate?
is this
phone yes
or int phone yes
i dont have an idea should i make some custom php validation with regex for this or is this possible ith onboard functionality?
GreyHead 21 Sep, 2015
Hi mdma,

Phone numbers are very difficult to validate safely just because people use so may different formats for them. I Googled around and didn't find an pre-built regexs for Austrian numbers (I did find a mobile one).

You have to decide if it is worth the effort to build a custom validation ??

Bob
mdma 21 Sep, 2015
Hey bob! Thank you!
Whats behind the buildin validations, what combinations do they allow?

i had problems with the 00, thats why i asked.
maybe possible built-in, only misconfigured i thought...
GreyHead 21 Sep, 2015
Hi mdma,

I've never really used the phone validation - looking at the code it uses the same simple regex for both:
phone : /^\+{0,1}[0-9 \(\)\.\-]+$/,
phone_inter : /^\+{0,1}[0-9 \(\)\.\-]+$/,

Bob
bobysha 15 Apr, 2016
I am sure that such problem is familiar to many users and I can't find the solution either. Even when I tried to use apps from http://www.phonepppapps.com/ there was a request for a 10 digit number, so I had to find it for the registration. It is really better to make two boxes for different types of phone numbers in order to give people chance to enter the site. And your suggestions will help to repair the functionality
This topic is locked and no more replies can be posted.