From 547f1b3e8cc9efc54609556f1a8e84822e303663 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Mon, 6 Jan 2025 22:06:05 +0530 Subject: [PATCH] fix: Error message is not displayed when entering characters that cannot be in a zip code. Signed-off-by: krishna2323 --- src/components/AddPaymentCard/PaymentCardForm.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/AddPaymentCard/PaymentCardForm.tsx b/src/components/AddPaymentCard/PaymentCardForm.tsx index bcb3e27783e8..2d7169d9669d 100644 --- a/src/components/AddPaymentCard/PaymentCardForm.tsx +++ b/src/components/AddPaymentCard/PaymentCardForm.tsx @@ -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'); }