Repository navigation
Allow hyphens in bank account legal names - #107083
Conversation
The bank account name forms only accepted Latin letters and spaces, so names like Smith-Jones were rejected. They now use isValidDisplayName, the rule the Settings legal name page already applies: any character except commas and semicolons. Removes isValidLegalName, its Latin-only regex, and the two error messages that only it used.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Restores the two translation entries removed earlier, keeping this PR to the validation fix. The comma test now puts a comma or semicolon in both names, so both error branches in FullNameStep run.
|
@linhvovan29546 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-11-17.at.18.15.16.moviOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-11-17.at.17.00.15.mov |
Adds tests for getDisplayNameErrors and for the two signer name steps, so the name validation this PR touches stays covered after removing isValidLegalName and its tests.
linhvovan29546
left a comment
There was a problem hiding this comment.
Small cleanup: after this change, privatePersonalDetails.error.hasInvalidCharacter ("Name can only include Latin characters") and bankAccount.error.fullName no longer have any callers in src. Could we remove them from en.ts and the other language files so translators don't keep maintaining dead strings?
(personalDetails.error.hasInvalidCharacter is a different key and is still used.)
privatePersonalDetails.error.hasInvalidCharacter and bankAccount.error.fullName have no callers now that the name forms use isValidDisplayName.
Addressed |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.41-0 🚀
|
|
No help site update needed — this fixes overly restrictive legal-name validation to accept names such as Smith-Jones as users would expect, without adding a workflow or making existing article instructions incorrect. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
The legal name fields used when adding a bank account only accepted Latin letters and spaces, so hyphenated names like
Smith-Joneswere rejected. They now useisValidDisplayName, the same check as the Settings legal name page: any character except commas and semicolons.Fixed Issues
$ #106743
PROPOSAL: #106743 (comment)
Tests
Janeas the first name andSmith-Jonesas the last name, and tap Next.Smith, Jrand tap Next.Offline tests
Same as tests, with the network connection turned off once the legal name step is open.
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari