Skip to content

Commit 4f90ae4

Browse files
committed
add validate to reset-password screen as well
1 parent de9a4e6 commit 4f90ae4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

frontend/generated.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,7 @@
687687
simplyApp.commands.autofocus();
688688
},
689689
"registerVerify" : function(el) {
690-
let password = el.querySelector("input[type=password]");
691-
let entropyValid = simplyApp.actions.validatePasswordEntropy(password.value);
690+
let entropyValid = simplyApp.actions.validatePasswordEntropy(editor.pageData.register.password);
692691
if (!entropyValid) {
693692
return;
694693
}
@@ -699,6 +698,10 @@
699698
})
700699
},
701700
"changePassword" : function(el) {
701+
let entropyValid = simplyApp.actions.validatePasswordEntropy(editor.pageData.reset.password);
702+
if (!entropyValid) {
703+
return;
704+
}
702705
simplyApp.actions.changePassword()
703706
.then(function() {
704707
document.location.hash = "reset-password-changed";
@@ -1038,7 +1041,7 @@ <h1>Wachtwoordherstel</h1>
10381041
<form class="solid-form" data-simply-command="changePassword" action="#">
10391042
<p>Voer je nieuwe wachtwoord in</p>
10401043
<div class="solid-form-group">
1041-
<input autofocus class="solid-input" data-simply-field="reset.password" type="password" placeholder="Wachtwoord" required>
1044+
<input data-simply-transformer="validateEntropy" autofocus class="solid-input" data-simply-field="reset.password" type="password" placeholder="Wachtwoord" required>
10421045
</div>
10431046
<button class="solid-button solid-button-primary">Volgende</button>
10441047
</form>

0 commit comments

Comments
 (0)