File size: 1,423 Bytes
70ba681 e0f0067 70ba681 e0f0067 70ba681 e0f0067 70ba681 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
<!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> |