I'm using the following code to validate country code and contact number :
var e = window.intlTelInput(document.querySelector("#phone"), { separateDialCode: !0, preferredCountries: [currentCountry], hiddenInput: "full", utilsScript: "//cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.3/js/utils.js" });
but the issue is when i validate
jQuery.validator.addMethod(
"phoneNumValidation",
function (el, t) {
return e.isValidNumber();
},
return "Please Enter Valid Phone Number"
),
on error country code is appended existing number.
there are some other fields which are being validated so as soon jquery validator is fired extra country code is being appended.