From d1fe72a4ab37bd87836e8a2ad03c6c66999c03de Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:34:30 +0100 Subject: [PATCH] Fix the maxlength org name bug (#12397) --- apps/web/src/locales/en/messages.json | 3 +++ .../providers/clients/create-client-dialog.component.html | 8 ++++++++ .../providers/clients/create-client-dialog.component.ts | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index abc3aa3a1d..36143682fa 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -9969,5 +9969,8 @@ }, "domainClaimed": { "message": "Domain claimed" + }, + "organizationNameMaxLength": { + "message": "Organization name cannot exceed 50 characters." } } diff --git a/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.html b/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.html index a08f5710f1..78f2cb41be 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.html +++ b/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.html @@ -43,6 +43,14 @@ {{ "organizationName" | i18n }} + + {{ "organizationNameMaxLength" | i18n }} + diff --git a/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.ts b/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.ts index 18910491a0..2a27b1b32f 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/billing/providers/clients/create-client-dialog.component.ts @@ -47,7 +47,7 @@ export class CreateClientDialogComponent implements OnInit { protected discountPercentage: number; protected formGroup = new FormGroup({ clientOwnerEmail: new FormControl("", [Validators.required, Validators.email]), - organizationName: new FormControl("", [Validators.required]), + organizationName: new FormControl("", [Validators.required, Validators.maxLength(50)]), seats: new FormControl(null, [Validators.required, Validators.min(1)]), }); protected loading = true;