-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Remove Zip Code validation from Add a payment card page #53178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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'); | ||||||
| } | ||||||
|
|
@@ -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} | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed this line because on mWeb platforms this would only allow numeric input which would restrict users from typing UK Zip Codes what contain characters and numbers (ex. SW8 4LT). The issue was present on iOS: mWeb as well, here's an example from Android: mWeb before and after removing the line:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that makes sense, thanks |
||||||
| maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE} | ||||||
| containerStyles={[styles.mt5]} | ||||||
| /> | ||||||
|
|
||||||


Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a comment to prevent others reverting this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change will be visible in blame which will lead to this PR / issue and it's self explanatory that we removed the specific Zip Code validation for time being, the explanation being visible in the PRs description.