Skip to content

Commit

Permalink
Merge pull request #53178 from ikevin127/ikevin127-removePaymentCardZ…
Browse files Browse the repository at this point in the history
…ipValidation

Remove Zip Code validation from Add a payment card page
  • Loading branch information
danieldoglas authored Dec 4, 2024
2 parents 5538c4d + 2ad0ddf commit aa55b4d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/components/AddPaymentCard/PaymentCardForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down Expand Up @@ -283,10 +279,9 @@ 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}
inputMode={CONST.INPUT_MODE.NUMERIC}
maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE}
containerStyles={[styles.mt5]}
/>
Expand Down

0 comments on commit aa55b4d

Please sign in to comment.