Form Jquery Validation

PHOTO EMBED

Tue Aug 08 2023 09:56:15 GMT+0000 (Coordinated Universal Time)

Saved by @gshailesh27

jQuery(".registerform-password").append('<p id="passerror"></p>');
jQuery("#passerror").hide();
jQuery(".registerform-password .input").keyup(function () {
        validatePassword();
    });
    function validatePassword() {
        let passwordValue = jQuery(".registerform-password .input").val();
        if (passwordValue.length == "") {
            jQuery("#passerror").show();
            passwordError = false;
            return false;
        }
        if (passwordValue.length < 8) {
            jQuery("#passerror").show();
            jQuery("#passerror").html(
                "**length of your password more then 8 character"
            );
            jQuery(".submit input"). attr("disabled", true);
            jQuery("#passerror").css("color", "red");
            passwordError = false;
            return false;
        } else {
            jQuery("#passerror").hide();
            jQuery(".submit input"). attr("disabled", false);
        }
    }
content_copyCOPY