Skip to content

Commit

Permalink
fix: HS-132: Fixed areRequiredFieldsValid for postal code (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArushKapoorJuspay authored Jan 11, 2024
1 parent 848eb39 commit bccd88c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,12 @@ let make = (
| PhoneNumber => Some(phone.value !== "")
| StateAndCity => Some(state.value !== "" && city.value !== "")
| CountryAndPincode(countryArr) =>
Some((country !== "" || countryArr->Belt.Array.length === 0) && postalCode.value !== "")
Some(
(country !== "" || countryArr->Belt.Array.length === 0) &&
postalCode.isValid->Belt.Option.getWithDefault(false),
)
| AddressCity => Some(city.value !== "")
| AddressPincode => Some(postalCode.value !== "")
| AddressPincode => postalCode.isValid
| AddressState => Some(state.value !== "")
| BlikCode => Some(blikCode.value !== "")
| Currency(currencyArr) => Some(currency !== "" || currencyArr->Belt.Array.length === 0)
Expand Down

0 comments on commit bccd88c

Please sign in to comment.