diff --git a/apps/web/src/app/auth/settings/two-factor-email.component.html b/apps/web/src/app/auth/settings/two-factor-email.component.html
index cf1dba98842..d15bde1d938 100644
--- a/apps/web/src/app/auth/settings/two-factor-email.component.html
+++ b/apps/web/src/app/auth/settings/two-factor-email.component.html
@@ -26,12 +26,12 @@
appInputVerbatim="false"
/>
-
+
- {{ "verificationCodeEmailSent" | i18n: sentEmail }}
+ {{ "emailSent" | i18n }}
diff --git a/apps/web/src/app/auth/settings/two-factor-email.component.ts b/apps/web/src/app/auth/settings/two-factor-email.component.ts
index 8a5c0292230..b0b7c0a64f0 100644
--- a/apps/web/src/app/auth/settings/two-factor-email.component.ts
+++ b/apps/web/src/app/auth/settings/two-factor-email.component.ts
@@ -31,7 +31,7 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
emailPromise: Promise;
override componentName = "app-two-factor-email";
formGroup = this.formBuilder.group({
- token: [null],
+ token: ["", [Validators.required]],
email: ["", [Validators.email, Validators.required]],
});
@@ -79,6 +79,10 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
}
submit = async () => {
+ this.formGroup.markAllAsTouched();
+ if (this.formGroup.invalid) {
+ return;
+ }
if (this.enabled) {
await this.disableEmail();
this.onChangeStatus.emit(false);