You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// checks that anything has been entered into password fields
if (password.validity.valueMissing || confirmPassword.validity.valueMissing) {
error.innerHTML = "Please enter a password and confirm your password";
error.className = "error";
password.classList.add("incorrect-field");
confirmPassword.classList.add("incorrect-field");
return;
}
// checks that email is valid
if (regEmail.validity.typeMismatch || regEmail.validity.valueMissing) {
console.log("reached");
error.innerHTML = "Please enter a valid email address";
error.className = "error";
regEmail.classList.add("incorrect-field");
return;
}
// checks that anything has been entered into password fields
if (password.validity.valueMissing || confirmPassword.validity.valueMissing) {
error.innerHTML = "Please enter a password and confirm your password";
error.className = "error";
password.classList.add("incorrect-field");
confirmPassword.classList.add("incorrect-field");
return;
}
looks like you repeat the same if statement twice @ checks that anything has been entered into password fields
The text was updated successfully, but these errors were encountered:
looks like you repeat the same if statement twice @ checks that anything has been entered into password fields
The text was updated successfully, but these errors were encountered: