Preview:
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);
        }
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter