Change the phone number validation regex.

This commit is contained in:
Alex Tselegidis 2022-01-24 20:44:52 +01:00
parent 2bf9a6193e
commit 86d3ce8dc9

View file

@ -37,7 +37,7 @@ window.App.Utils.Validation = (function () {
* @return {Boolean} * @return {Boolean}
*/ */
function phone(value) { function phone(value) {
const re = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im; const re = /^[+]?([0-9]*[\.\s\-\(\)]|[0-9]+){3,24}$/;
return re.test(value); return re.test(value);
} }