Remove Zip Code validation from Add a payment card page#53178
Remove Zip Code validation from Add a payment card page#53178danieldoglas merged 3 commits intoExpensify:mainfrom
Conversation
| label={translate('common.zip')} | ||
| aria-label={translate('common.zip')} | ||
| role={CONST.ROLE.PRESENTATION} | ||
| inputMode={CONST.INPUT_MODE.NUMERIC} |
There was a problem hiding this comment.
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:
| Before | After |
|---|---|
![]() |
![]() |
|
Note No testing was done on Native platforms because the Add a payment card page is not available on native: App/src/pages/settings/Subscription/PaymentCard/index.native.tsx Lines 5 to 15 in c4ff235 |
|
@getusha It has been 5 days without any updates regarding review - any updates on this ? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeN/a Android: mWeb ChromeScreen.Recording.2024-12-03.at.5.20.50.in.the.afternoon.moviOS: NativeN/a iOS: mWeb SafariScreen.Recording.2024-12-03.at.5.21.24.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-12-03.at.5.15.47.in.the.afternoon.movMacOS: DesktopScreen.Recording.2024-12-03.at.5.26.43.in.the.afternoon.mov |
| errors.addressStreet = translate(label.error.addressStreet); | ||
| } | ||
|
|
||
| if (values.addressZipCode && !ValidationUtils.isValidZipCode(values.addressZipCode)) { |
There was a problem hiding this comment.
should we add a comment to prevent others reverting this change?
There was a problem hiding this comment.
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.
Updated postcode input label to match the label found in the form on Settings > Profile > Private > Address , as requested in Expensify#52642 (comment).
|
@danieldoglas The PR is ready to be merged, the latest commit was an input labal change request asked last minute in the issue #52642 (comment). |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 9.0.72-0 🚀
|
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 9.0.72-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.72-1 🚀
|


Explanation of Change
After getting feedback from the team in #52642 (comment), we decided to completely remove Zip Code validation in order to aligh with OD, meaning the only validation left in the Payment Card form for the Zip Code is that the field is required.
Fixed Issues
$ #52642
PROPOSAL: #52642 (comment)
Tests
Offline tests
Same as QA Steps.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Add a payment card page is not available on native:
App/src/pages/settings/Subscription/PaymentCard/index.native.tsx
Lines 5 to 15 in c4ff235
Android: mWeb Chrome
screen-20241126-154123.mp4
iOS: Native
Add a payment card page is not available on native:
App/src/pages/settings/Subscription/PaymentCard/index.native.tsx
Lines 5 to 15 in c4ff235
iOS: mWeb Safari
ios-mweb.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov