From cd7aaacfd95eb5c67c656d6aff94b307684171e4 Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:01:19 +0100 Subject: [PATCH] [PM-10026] [Defect] Zip code is not being enforced when subscribing in Password Manager (#10446) * resolve the postal code error * Resolve the issue if licence is uploaded * resolve the postal code issue on selfhost --- apps/web/src/app/billing/individual/premium.component.ts | 8 +++++--- .../billing/organizations/organization-plans.component.ts | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/web/src/app/billing/individual/premium.component.ts b/apps/web/src/app/billing/individual/premium.component.ts index 7b1e46805b..b43d3cef34 100644 --- a/apps/web/src/app/billing/individual/premium.component.ts +++ b/apps/web/src/app/billing/individual/premium.component.ts @@ -65,9 +65,11 @@ export class PremiumComponent implements OnInit { } } submit = async () => { - if (!this.taxInfoComponent?.taxFormGroup.valid && this.taxInfoComponent?.taxFormGroup.touched) { - this.taxInfoComponent.taxFormGroup.markAllAsTouched(); - return; + if (this.taxInfoComponent) { + if (!this.taxInfoComponent?.taxFormGroup.valid) { + this.taxInfoComponent.taxFormGroup.markAllAsTouched(); + return; + } } this.licenseForm.markAllAsTouched(); this.addonForm.markAllAsTouched(); diff --git a/apps/web/src/app/billing/organizations/organization-plans.component.ts b/apps/web/src/app/billing/organizations/organization-plans.component.ts index 13b15eb9ee..995dcb2389 100644 --- a/apps/web/src/app/billing/organizations/organization-plans.component.ts +++ b/apps/web/src/app/billing/organizations/organization-plans.component.ts @@ -554,9 +554,11 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } submit = async () => { - if (!this.taxComponent?.taxFormGroup.valid && this.taxComponent?.taxFormGroup.touched) { - this.taxComponent?.taxFormGroup.markAllAsTouched(); - return; + if (this.taxComponent) { + if (!this.taxComponent?.taxFormGroup.valid) { + this.taxComponent?.taxFormGroup.markAllAsTouched(); + return; + } } if (this.singleOrgPolicyBlock) {