How to check german phone number using javascript?

In the application I need to check the form field for German phone numbers, tried some, but it doesn’t work for sure, any help would be appreciated.

+4
source share
1 answer

The answers to this question should solve this for you: Verify your phone number using JavaScript

You just need to adjust the regex to match the German format

A regular expression from https://github.com/posabsolute/jQuery-Validation-Engine/issues/265 can do the job: / ^ ([+] [0-9] {1,3} [.-])? ([(] {1} [0-9] {1,6} [)])? ([0-9. - /] {3,20}) ((x | ext | extension) []? [0-9] {1,4})? $ /

+7
source

All Articles