Loginauth / templates /reset-password.html
Gregniuki's picture
Update templates/reset-password.html
e0f0067
raw
history blame
1.42 kB
<!DOCTYPE html>
<html>
<head>
<title>Password Reset</title>
<!-- Add your additional head elements here -->
<script>
function validatePassword() {
var password = document.getElementById("new-password").value;
var confirmPassword = document.getElementById("confirm-password").value;
var regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,}$/;
if (password != confirmPassword) {
alert("Passwords do not match.");
return false;
} else if (!regex.test(password)) {
alert("Password must be at least 6 characters long and include at least one lowercase letter, one uppercase letter, one numeric digit, and one special character.");
return false;
}
return true;
}
</script>
</head>
<body>
<form action="/reset-password" method="post" onsubmit="return validatePassword()">
<input type="hidden" name="token" value="{{ token }}">
<label for="new-password">New Password:</label>
<input type="password" id="new-password" name="new_password" required><br><br>
<label for="confirm-password">Confirm Password:</label>
<input type="password" id="confirm-password" required><br><br>
<button type="submit">Reset Password</button>
</form>
</body>
</html>