[PM-2135] feat: use form validation in prompt

This commit is contained in:
Andreas Coroiu 2023-05-05 11:24:42 +02:00
parent 59813b4140
commit f06844521f
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A
1 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,12 @@ export class UserVerificationPromptComponent {
}
submit = async () => {
this.formGroup.markAllAsTouched();
if (this.formGroup.invalid) {
return;
}
try {
//Incorrect secret will throw an invalid password error.
await this.userVerificationService.verifyUser(this.secret.value);