-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Refactor] Form validation translated error #20228
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
[Refactor] Form validation translated error #20228
Conversation
|
@fedirjh let me know when this is ready for review |
Web TestsIOS TestsmWeb Safari TestsAndroid TestsmWeb Chrome TestsDesktop Tests |
… of different TaskTitle forms
…methods of different Personal details forms
… of different TaskTitle forms
…methods of different Personal details forms
…ements' into Form-validation-translate-enhancements # Conflicts: # src/pages/settings/Profile/PersonalDetails/AddressPage.js
e4ddba0 to
bbbca31
Compare
Translate is done twice only for concatenated errors (multiline errors) generated by |
|
One minor thing:
Reserved room name : e.g |
Reviewer Checklist
Screenshots/VideosWebPersonal Details web-3.movMobile Web - ChromeManual Bank Account mchrome-8.movmchrome-8.2.movMobile Web - SafariTask Title msafari-2.movDesktopSecondary Contact, Security, Debit Card desktop4-6.moviOSWorkspace Room Name ios-1.movios-1.2.movAndroidWorkspace android-7.mov |
0xmiroslav
left a comment
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.
Tested all possible cases.
@luacmartins all yours!
0xmiroslav
left a comment
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.
Oops! I thought you applied my suggestion
luacmartins
left a comment
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.
LGTM. @fedirjh we have conflicts
luacmartins
left a comment
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.
LGTM! @stitesExpensify all yours
|
Gonna merge to avoid more conflicts since we are touching 34 files. |
|
✋ 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/luacmartins in version: 1.3.28-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|





































































































































































cc @luacmartins
Details
This pr is a follow-up to the previous changes made in PR #19324 and PR #20093. While those PRs introduced initial updates to improve error handling by implementing key-based error storage, it was identified that there are still remaining form validation methods that require updates to align with the new mechanism.
The purpose of this follow-up PR is to comprehensively cover all form validation methods and ensure they return the error key rather than the translated string. By doing so, we aim to achieve consistent and streamlined error handling across the entire application, eliminating any remnants of the old translation-based approach.
Fixed Issues
$ #20472
#20093
#20093 (comment)
Tests
Test 1 : Workspace Room Name
adminsTestName. Room names can only include lowercase letters, numbers and hyphensTest 2 : Task Title
Please enter a titlePlease enter a titleTest 3 : Personal Details
Concierge;,and verify both errors are displayedTest 4 : Secondary Contact
Test 5 : Security
Test 6 : Debit Card
Test 7 : Workspace
You need to define a name for your workspace.Please enter a valid rateTest 8 : Manual Bank Account
Company informationstepPersonal informationstepOffline 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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android