From d02583a0294dfcfed761c0e198caf41120623d00 Mon Sep 17 00:00:00 2001 From: Alessandro Ferro <49845537+xfarrow@users.noreply.github.com> Date: Tue, 26 Mar 2024 23:32:27 +0100 Subject: [PATCH] remove onblur --- frontend/vanilla/html/reset-password.html | 38 ++--------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/frontend/vanilla/html/reset-password.html b/frontend/vanilla/html/reset-password.html index 5ef75b2..25896ff 100644 --- a/frontend/vanilla/html/reset-password.html +++ b/frontend/vanilla/html/reset-password.html @@ -26,13 +26,13 @@
+ placeholder="Your new password">
+ placeholder="Confirm password">
@@ -85,40 +85,6 @@ } } - function passwordLosesFocus() { - const passwordField = document.getElementById("password"); - - if(!passwordField.value){ - passwordField.classList.add("is-invalid"); - document.getElementById('password-invalid-feedback').innerHTML = 'Please fill out this field'; - } - else if(passwordField.value.length < 5){ - passwordField.classList.add("is-invalid"); - document.getElementById('password-invalid-feedback').innerHTML = - 'Password must be at least 5 characters'; - } - else{ - passwordField.classList.remove("is-invalid"); - } - } - - function confirmPasswordLosesFocus() { - const confirmPasswordField = document.getElementById("confirmPassword"); - - if(!passwordField.value){ - confirmPasswordField.classList.add("is-invalid"); - document.getElementById('confirmpassword-invalid-feedback').innerHTML = 'Please fill out this field'; - } - else if(passwordField.value.length < 5){ - confirmPasswordField.classList.add("is-invalid"); - document.getElementById('confirmpassword-invalid-feedback').innerHTML = - 'Password must be at least 5 characters'; - } - else{ - confirmPasswordField.classList.remove("is-invalid"); - } - } - function validateFields() { const passwordField = document.getElementById("password"); const confirmPasswordField = document.getElementById("confirmPassword");