I wrote a quick phone number validation regExp form my form validator, you can use it at your own risk :) .
usage is quite straighforward:
//random number
var number = '+237 348 547 12',//var number = '(+237) 348 547 12',
//var number = '237 348 547 12',
regExp = /^((\+\d+)|(\(\+?\d+\)))?\s*\d([\d+\-/ ])+$/;
alert(regExp.test(number))
let me know it you find something wrong with it.
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire