Fix: Large legal name are not saved and no error message is displayed#29740
Fix: Large legal name are not saved and no error message is displayed#29740srikarparsi merged 4 commits intoExpensify:mainfrom
Conversation
src/CONST.ts
Outdated
There was a problem hiding this comment.
@dukenv0307 CONST.DISPLAY_NAME.MAX_LENGTH is used in multiple places, this change will affect other validations, I think it's best to fix this in the backend Or we have to create a new const.
There was a problem hiding this comment.
I just created a new CONST for this.
Reviewer Checklist
Screenshots/Videos |
There was a problem hiding this comment.
When more than one method is used to validate the value, the
addErrorMessagefunction fromErrorUtilsshould be used
Let's use ErrorUtils.addErrorMessage, more context in FORMS.md
For instance, check the video, both errors should be displayed at the same time :
CleanShot.2023-10-18.at.19.32.14.mp4
|
@fedirjh Friendly bump. Can you help review the PR again |
|
✋ 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/srikarparsi in version: 1.3.88-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.88-11 🚀
|






Details
The app should not allow to save and display error when we enter an invalid name
Fixed Issues
$ #19821
PROPOSAL: #19821 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Screen.Recording.2023-10-19.at.11.15.47.mp4
Android: mWeb Chrome
Screen.Recording.2023-10-19.at.11.19.00.mov
iOS: Native
Screen.Recording.2023-10-19.at.11.03.20.mov
iOS: mWeb Safari
Screen.Recording.2023-10-19.at.11.04.23.mov
MacOS: Chrome / Safari
web.8.mp4
MacOS: Desktop
Screen.Recording.2023-10-19.at.11.22.53.mov