From e23bc6b77be8944618b4dd666946c49d38719dd5 Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Fri, 2 May 2025 16:50:50 +0100 Subject: [PATCH] [PM-21073] No error when submitting empty form (#14597) * Resolve the space in note and colon issue * Resolve the max length for Note * Revert the changes --- .../billing/members/add-sponsorship-dialog.component.html | 5 ++--- .../app/billing/members/add-sponsorship-dialog.component.ts | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html index 405211d6ecb..5bcfe9a15e1 100644 --- a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html +++ b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html @@ -7,7 +7,7 @@
- {{ "email" | i18n }}: + {{ "email" | i18n }}
- {{ "notes" | i18n }}: + {{ "notes" | i18n }}
diff --git a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts index 1b044e66257..7e6c0d464c3 100644 --- a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts +++ b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts @@ -74,7 +74,9 @@ export class AddSponsorshipDialogComponent { asyncValidators: [this.isOrganizationMember.bind(this)], updateOn: "change", }), - sponsorshipNote: new FormControl("", {}), + sponsorshipNote: new FormControl("", { + validators: [Validators.maxLength(1000)], + }), }); } @@ -86,6 +88,8 @@ export class AddSponsorshipDialogComponent { } protected async save() { + this.sponsorshipEmailControl.markAllAsTouched(); + if (this.sponsorshipForm.invalid) { return; }