1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-23 16:38:45 +01:00

Fix the maxlength org name bug ()

This commit is contained in:
cyprain-okeke 2024-12-17 20:34:30 +01:00 committed by GitHub
parent 1d874b447e
commit d1fe72a4ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions
apps/web/src/locales/en
bitwarden_license/bit-web/src/app/billing/providers/clients

View File

@ -9969,5 +9969,8 @@
},
"domainClaimed": {
"message": "Domain claimed"
},
"organizationNameMaxLength": {
"message": "Organization name cannot exceed 50 characters."
}
}

View File

@ -43,6 +43,14 @@
{{ "organizationName" | i18n }}
</bit-label>
<input type="text" bitInput formControlName="organizationName" />
<bit-error-summary
*ngIf="
formGroup.get('organizationName').errors?.['maxLength'] &&
formGroup.get('organizationName').touched
"
>
{{ "organizationNameMaxLength" | i18n }}
</bit-error-summary>
</bit-form-field>
<bit-form-field>
<bit-label>

View File

@ -47,7 +47,7 @@ export class CreateClientDialogComponent implements OnInit {
protected discountPercentage: number;
protected formGroup = new FormGroup({
clientOwnerEmail: new FormControl<string>("", [Validators.required, Validators.email]),
organizationName: new FormControl<string>("", [Validators.required]),
organizationName: new FormControl<string>("", [Validators.required, Validators.maxLength(50)]),
seats: new FormControl<number>(null, [Validators.required, Validators.min(1)]),
});
protected loading = true;