From 0c6e296dc37c1ee1e9fd0240031619117747087b Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Mon, 17 Jun 2024 17:23:25 -0400 Subject: [PATCH] add validation to form (#9691) --- apps/web/src/app/auth/recover-two-factor.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/web/src/app/auth/recover-two-factor.component.ts b/apps/web/src/app/auth/recover-two-factor.component.ts index 4996dbe0a5..28296aa89d 100644 --- a/apps/web/src/app/auth/recover-two-factor.component.ts +++ b/apps/web/src/app/auth/recover-two-factor.component.ts @@ -42,6 +42,11 @@ export class RecoverTwoFactorComponent { } submit = async () => { + this.formGroup.markAllAsTouched(); + if (this.formGroup.invalid) { + return; + } + const request = new TwoFactorRecoveryRequest(); request.recoveryCode = this.recoveryCode.replace(/\s/g, "").toLowerCase(); request.email = this.email.trim().toLowerCase();