0
hello, I’m starting in the world of jquery and I’m working with djando and python and the form has the jquery below
<script>
$('#validator').prop('disabled' , true);
$('#senha2').on('keyup', function () {
var password = $("#senha").val();
var confirmPassword = $("#senha2").val();
if (password != confirmPassword) {
$("#divCheckPassword").html("As senhas não são").css('color', 'red');
$('#validator').prop('disabled' , true);
} else {
$("#divCheckPassword").html("Senhas identicas").css('color', 'green');
$('#validator').prop('disabled' , false);
}
});
</script>
and it works perfectly it only activates the form button if both emails have certain, but I need him to do it using email and tbm the iinpput of the password and to make matters worse I need it to be configured so that the password has at least 8 characters and at most 16 and that the email fields are considered equal only if the emails are validated. I wish it was being validated while typing
I think I really want to