fake password stuff
This commit is contained in:
parent
7ba061682c
commit
10fb809271
@ -1,6 +1,7 @@
|
||||
{{ define "register" }}
|
||||
{{ template "header" .}}
|
||||
<body>
|
||||
<div>
|
||||
<form method="POST" action="/register">
|
||||
<table>
|
||||
<tr>
|
||||
@ -12,8 +13,12 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td><input type="password" placeholder="Password" name="password"></td>
|
||||
<td><input type="password" id="psw" name="psw" pattern="(?=.*\d)(?=.*[a-z]).{8,}" title="Must contain at least one number and at least 8 or more characters" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Confirm Password:</td>
|
||||
<td><input type="password" name="confirm_password" id="confirm_psw" onchange="check()"/></td>
|
||||
<td><span id='message'></span></td>
|
||||
<tr>
|
||||
<td>Secret:</td>
|
||||
<td><input type="password" placeholder="secret" name="secret"></td>
|
||||
@ -23,5 +28,24 @@
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="requirements">
|
||||
<h3>Password must contain the following:</h3>
|
||||
<p id="letter" class="invalid">A <b>lowercase</b> letter</p>
|
||||
<p id="capital" class="invalid">A <b>capital (uppercase)</b> letter</p>
|
||||
<p id="number" class="invalid">A <b>number</b></p>
|
||||
<p id="length" class="invalid">Minimum <b>8 characters</b></p>
|
||||
</div>
|
||||
<script>
|
||||
function check() {
|
||||
if(document.getElementById('psw').value ===
|
||||
document.getElementById('confirm_psw').value) {
|
||||
document.getElementById('message').innerHTML = "Passwords match";
|
||||
} else {
|
||||
document.getElementById('message').innerHTML = "Passwords don't match";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{ template "footer" .}}
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user