Real Time Password Matching Checker

Share Now

#Put This Into jQuery(document).ready function

function checkPasswordMatch() {
    var password = $(".txtNewPassword").val();
    var confirmPassword = $(".txtConfirmPassword").val();

    if ((password !== "" && confirmPassword !== "") && (password != confirmPassword)) {

        $("#input_box_1578523623_field").html("<div class='erro-mix'>Passwords do not match!</div>");
    }

    if ((password !== "" && confirmPassword !== "") && (password == confirmPassword)) {

        $("#input_box_1578523623_field").html("<div class='erro-mix-g'>Passwords match!</div>");

    }
}

$(".txtNewPassword, .txtConfirmPassword").keyup(checkPasswordMatch);
Picture of Nahid Mahamud

Nahid Mahamud

Web Developer | Graphic Designer | WordPress & Woo-commerce Expert