From 0a352839d31b208d10e65a8b69c090ec9e082c70 Mon Sep 17 00:00:00 2001 From: ArtemDzhereleiko Date: Wed, 19 Nov 2025 18:07:11 +0200 Subject: [PATCH] UI: Add error msg to send code card for twoFA enforce --- ...force-two-factor-auth-login.component.html | 15 +++++-- .../force-two-factor-auth-login.component.ts | 42 ++++++++++++------- .../assets/locale/locale.constant-en_US.json | 2 + 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/ui-ngx/src/app/modules/login/pages/login/force-two-factor-auth-login.component.html b/ui-ngx/src/app/modules/login/pages/login/force-two-factor-auth-login.component.html index 39236ef8e2..94bd0b2cf0 100644 --- a/ui-ngx/src/app/modules/login/pages/login/force-two-factor-auth-login.component.html +++ b/ui-ngx/src/app/modules/login/pages/login/force-two-factor-auth-login.component.html @@ -262,9 +262,18 @@ inputmode="numeric" pattern="[0-9]*" autocomplete="off" placeholder="{{ 'login.verification-code' | translate }}"> - - {{ 'login.verification-code-invalid' | translate }} - + @if (configForm.get('verificationCode').getError('required') || + configForm.get('verificationCode').getError('minlength') || + configForm.get('verificationCode').getError('maxlength') || + configForm.get('verificationCode').getError('pattern')) { + {{ 'login.verification-code-invalid' | translate }} + } + @if (configForm.get('verificationCode').getError('incorrectCode')) { + {{ 'login.verification-code-incorrect' | translate }} + } + @if (configForm.get('verificationCode').getError('tooManyRequest')) { + {{ 'login.verification-code-many-request' | translate }} + }