Skip to content

Commit

Permalink
Fix rule on address requirement for NLD membership (#683)
Browse files Browse the repository at this point in the history
Closes FRONT-973
  • Loading branch information
bloodyowl authored Apr 9, 2024
1 parent 15f39a0 commit 345515b
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions clients/banking/src/components/NewMembershipWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ export const NewMembershipWizard = ({
canInitiatePayments: getFieldState("canInitiatePayments").value,
})
.with(
{ accountCountry: "NLD" },
{ canViewAccount: true },
{ canInitiatePayments: true },
P.intersection(
{ accountCountry: "NLD" },
P.union({ canViewAccount: true }, { canInitiatePayments: true }),
),
() => {
const validate = combineValidators(validateRequired, validateAddressLine);
return validate(value);
Expand All @@ -247,9 +248,10 @@ export const NewMembershipWizard = ({
canInitiatePayments: getFieldState("canInitiatePayments").value,
})
.with(
{ accountCountry: "NLD" },
{ canViewAccount: true },
{ canInitiatePayments: true },
P.intersection(
{ accountCountry: "NLD" },
P.union({ canViewAccount: true }, { canInitiatePayments: true }),
),
() => {
return validateRequired(value);
},
Expand All @@ -266,9 +268,10 @@ export const NewMembershipWizard = ({
canInitiatePayments: getFieldState("canInitiatePayments").value,
})
.with(
{ accountCountry: "NLD" },
{ canViewAccount: true },
{ canInitiatePayments: true },
P.intersection(
{ accountCountry: "NLD" },
P.union({ canViewAccount: true }, { canInitiatePayments: true }),
),
() => {
return validateRequired(value);
},
Expand All @@ -285,9 +288,10 @@ export const NewMembershipWizard = ({
canInitiatePayments: getFieldState("canInitiatePayments").value,
})
.with(
{ accountCountry: "NLD" },
{ canViewAccount: true },
{ canInitiatePayments: true },
P.intersection(
{ accountCountry: "NLD" },
P.union({ canViewAccount: true }, { canInitiatePayments: true }),
),
() => {
return validateRequired(value);
},
Expand Down

0 comments on commit 345515b

Please sign in to comment.