Skip to content

Commit d967554

Browse files
committed
feat(client:auth): don't submit forms if invalid
1 parent acb09d1 commit d967554

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: templates/app/client/app/account(auth)/settings/settings.component.js

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export class SettingsComponent {
3838
}
3939

4040
changePassword(form) {
41+
if(form.invalid) return;
42+
4143
this.submitted = true;
4244

4345
return this.AuthService.changePassword(this.user.oldPassword, this.user.newPassword)

Diff for: templates/app/client/app/account(auth)/signup/signup.component.js

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export class SignupComponent {
4747
}
4848

4949
register(form) {
50+
if(form.invalid) return;
51+
5052
this.submitted = true;
5153

5254
return this.AuthService.createUser({

0 commit comments

Comments
 (0)