Lines 225-231
$(document).ready(function(){
Link Here
|
225 |
$.validator.addMethod( |
225 |
$.validator.addMethod( |
226 |
"phone", |
226 |
"phone", |
227 |
function(value, element, phone) { |
227 |
function(value, element, phone) { |
228 |
let e164_re = /^(\+[1-9]\d{0,2})?\d{1,12}$/; |
228 |
let e164_re = /^((\+?|(0{2})?)?[1-9]{0,2})?\d{1,12}$/; |
229 |
let has_plus = value.charAt(0) === '+'; |
229 |
let has_plus = value.charAt(0) === '+'; |
230 |
value = value.replace(/\D/g,''); |
230 |
value = value.replace(/\D/g,''); |
231 |
if ( has_plus ) value = '+' + value; |
231 |
if ( has_plus ) value = '+' + value; |
232 |
- |
|
|