From 6990c38208bcf95be85d2006ba1d994c5f4ce655 Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Tue, 26 Nov 2024 14:26:08 -0800 Subject: [PATCH 1/3] Remove payment card form Zip Code validation --- src/components/AddPaymentCard/PaymentCardForm.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/AddPaymentCard/PaymentCardForm.tsx b/src/components/AddPaymentCard/PaymentCardForm.tsx index 5aaa23b238f7..1fe4167b889c 100644 --- a/src/components/AddPaymentCard/PaymentCardForm.tsx +++ b/src/components/AddPaymentCard/PaymentCardForm.tsx @@ -165,10 +165,6 @@ function PaymentCardForm({ errors.addressStreet = translate(label.error.addressStreet); } - if (values.addressZipCode && !ValidationUtils.isValidZipCode(values.addressZipCode)) { - errors.addressZipCode = translate(label.error.addressZipCode); - } - if (!values.acceptTerms) { errors.acceptTerms = translate('common.error.acceptTerms'); } From 0e29ba13a5b15ca2567844e106fc6dbeba578699 Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Tue, 26 Nov 2024 15:44:14 -0800 Subject: [PATCH 2/3] Removed inputMode to allow non-numeric Zip Codes (UK) --- src/components/AddPaymentCard/PaymentCardForm.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/AddPaymentCard/PaymentCardForm.tsx b/src/components/AddPaymentCard/PaymentCardForm.tsx index 1fe4167b889c..cee7edb3af61 100644 --- a/src/components/AddPaymentCard/PaymentCardForm.tsx +++ b/src/components/AddPaymentCard/PaymentCardForm.tsx @@ -282,7 +282,6 @@ function PaymentCardForm({ label={translate('common.zip')} aria-label={translate('common.zip')} role={CONST.ROLE.PRESENTATION} - inputMode={CONST.INPUT_MODE.NUMERIC} maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE} containerStyles={[styles.mt5]} /> From 2ad0ddff8573a40039e6bfadeac63a88b2fe31d7 Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader <56457735+ikevin127@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:30:51 -0800 Subject: [PATCH 3/3] updated postcode input label Updated postcode input label to match the label found in the form on Settings > Profile > Private > Address , as requested in https://github.com/Expensify/App/issues/52642#issuecomment-2515725750. --- src/components/AddPaymentCard/PaymentCardForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AddPaymentCard/PaymentCardForm.tsx b/src/components/AddPaymentCard/PaymentCardForm.tsx index cee7edb3af61..9843996602f1 100644 --- a/src/components/AddPaymentCard/PaymentCardForm.tsx +++ b/src/components/AddPaymentCard/PaymentCardForm.tsx @@ -279,8 +279,8 @@ function PaymentCardForm({ InputComponent={TextInput} defaultValue={data?.addressZipCode} inputID={INPUT_IDS.ADDRESS_ZIP_CODE} - label={translate('common.zip')} - aria-label={translate('common.zip')} + label={translate('common.zipPostCode')} + aria-label={translate('common.zipPostCode')} role={CONST.ROLE.PRESENTATION} maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE} containerStyles={[styles.mt5]}