Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpisValidateIntPhone(telInput){
- var errorMsg = telInput.parent().parent().find(".error-msg"),
- validMsg = telInput.parent().parent().find(".valid-msg");
- wpisHideValidationErrors(telInput);
- if ($j.trim(telInput.val())) {
- if (telInput.intlTelInput("isValidNumber")) {
- validMsg.removeClass("hide");
- var nationalPhone = telInput.intlTelInput("getNumber");
- telInput.val(nationalPhone);
- // ->>>>> here you can add your code to ENABLE form submit button
- } else {
- telInput.addClass("error");
- errorMsg.removeClass("hide");
- validMsg.addClass("hide");
- // ->>>>> here you can add your code to DISABLE form submit button
- }
- }
- }
Add Comment
Please, Sign In to add comment