Skip to content

Commit

Permalink
fix: Error message is not displayed when entering characters that can…
Browse files Browse the repository at this point in the history
…not be in a zip code.

Signed-off-by: krishna2323 <[email protected]>
  • Loading branch information
Krishna2323 committed Jan 6, 2025
1 parent 8ca44da commit 547f1b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/AddPaymentCard/PaymentCardForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ function PaymentCardForm({
errors.addressStreet = translate(label.error.addressStreet);
}

if (values.addressZipCode && !ValidationUtils.isValidZipCode(values.addressZipCode)) {
errors.addressZipCode = translate('bankAccount.error.zipCode');
}

if (!values.acceptTerms) {
errors.acceptTerms = translate('common.error.acceptTerms');
}
Expand Down

0 comments on commit 547f1b3

Please sign in to comment.