diff --git a/app/components/dashboard/PasswordUpdate.tsx b/app/components/dashboard/PasswordUpdate.tsx index d69bdd98..f23bd638 100644 --- a/app/components/dashboard/PasswordUpdate.tsx +++ b/app/components/dashboard/PasswordUpdate.tsx @@ -74,6 +74,27 @@ const PasswordUpdate = () => { handlePasswordValidation(actualValue[value_]); } }; + const isFormValid = () => { + return ( + actualValue.currentPassword.length >= 5 && + validation.hasUppercase && + validation.hasNumber && + validation.hasMinLength && + actualValue.newPassword === actualValue.confirmPassword + ); + }; + const handleClick = () => { + setActualValue({ + currentPassword: "", + newPassword: "", + confirmPassword: "", + }); + setDisplayValue({ + currentPassword: "", + newPassword: "", + confirmPassword: "", + }); + }; useEffect(() => { const inputs = document.querySelectorAll(".psw-input"); for (const element of inputs) { @@ -263,6 +284,7 @@ const PasswordUpdate = () => {