Skip to content

Commit ad7726c

Browse files
author
Nitish Kumar
committed
Init
1 parent b53cb85 commit ad7726c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

default-views/account/register-form.hbs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
<input type="password" class="form-control" name="password" id="password" required />
2121
<input type="checkbox" onclick="showPasswd()">Show Password</input>
2222
</div>
23-
<div class="col-md-6">&nbsp;</div>
23+
<div class="col-md-6">&nbsp;
24+
<small id="passwordHelp" class="text-danger">
25+
</small>
26+
</div>
2427
</div>
2528
<div class="row">
2629
<div class="col-md-6">

default-views/account/register.hbs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,15 @@
2727
{{> account/register-form}}
2828
{{/if}}
2929
</div>
30+
<script src="https://raw.githubusercontent.com/nowsecure/owasp-password-strength-test/master/owasp-password-strength-test.js" defer></script>
31+
<script>
32+
function validatePassword () {
33+
let pw = document.getElementById('password').value;
34+
let owaspCheck = owaspPasswordStrengthTest.test(pw);
35+
//check for errors and show
36+
// call pwned api and check
37+
//submit the form
38+
}
39+
</script>
3040
</body>
3141
</html>

0 commit comments

Comments
 (0)