Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit 9f5b80f

Browse files
committed
#597: added email validator to reset form, show hint if the email isn't validated correctly
1 parent a7b9f2a commit 9f5b80f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/webFrontend/src/app/auth/reset/reset.component.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ export class ResetComponent implements OnInit {
4343
}
4444

4545
requestReset() {
46+
if (!this.resetForm.valid) {
47+
this.snackBar.open('The email address you entered is not valid.', 'Dismiss');
48+
return;
49+
}
50+
4651
this.showProgress.toggleLoadingGlobal(true);
4752
this.loading = true;
4853
this.authenticationService.requestReset(this.resetForm.value.email.replace(/\s/g, '').toLowerCase())
@@ -80,7 +85,7 @@ export class ResetComponent implements OnInit {
8085
this.resetForm = this.formBuilder.group({});
8186
} else {
8287
this.resetForm = this.formBuilder.group({
83-
email: ['', Validators.required]
88+
email: ['', Validators.email ]
8489
});
8590
}
8691
}

0 commit comments

Comments
 (0)