Skip to content

Commit

Permalink
Merge pull request #54816 from Krishna2323/krishna2323/issue/53918
Browse files Browse the repository at this point in the history
fix: Error message is not displayed when entering characters that cannot be in a zip code.
  • Loading branch information
Julesssss authored Jan 14, 2025
2 parents 58343c7 + 547f1b3 commit 7b8bb55
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 7b8bb55

Please sign in to comment.