Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Password Reset Form
<script>
function confirm() {
var pass1 = document.getElementById("passOne").value;
var pass2 = document.getElementById("passTwo").value;
if (pass1 != pass2) {
document.getElementById("passOne").style.borderColor = "#E34234";
document.getElementById("passTwo").style.borderColor = "#E34234";
alert("Password Don't Match");
} else {
alert("Passwords Match");
}
}
</script>
<form action="/reset" method="POST">
<input type="password" id="passOne" name="pass1" placeholder="Enter New Password">
<input type="password" id="passTwo" name="pass2" placeholder="Confirm New Password">
<input type="hidden" name="resetCode" value="<%= code %>" />
<input type="submit" onclick="confirm()">
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment