You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Pay meow][$1000] Legal name - When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters #31391
Version Number: Reproducible in staging?: Reproducible in production?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Slack conversation:
Action Performed:
Go to staging.new.expensify.com
Log in with any account
Go to Setting - Profile - Personal details - Legal name
Put cursor on legal first name than on Legal Last name
Expected Result:
When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters
Actual Result:
When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Legal name - When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters[/-][+][$500] Legal name - When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters[/+]on Nov 15, 2023
changed the title [-][$500] Legal name - When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters[/-][+][$500] Legal name - When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters[/+]on Nov 15, 2023
When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters
@Christinadobrzyn I think before I choose any proposal we should clarify, which error should be shown exactly? The expected result doesn't mention this.
changed the title [-][$1000] Legal name - When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters[/-][+][Pay meow][$1000] Legal name - When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters[/+]on Jan 31, 2024
Activity
[-]Legal name - When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters[/-][+][$500] Legal name - When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters[/+]melvin-bot commentedon Nov 15, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01df7fd3e27a4b1629
melvin-bot commentedon Nov 15, 2023
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 15, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 15, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (
External)5war00p commentedon Nov 15, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Switching between error messages when the message is empty in the legal name page
What is the root cause of that problem?
Chained if conditions causing this error message switch, instead we can have if-else if-else blocks only.
What changes do you think we should make in order to solve the problem?
App/src/pages/settings/Profile/PersonalDetails/LegalNamePage.js
Lines 57 to 74 in 4618b39
Change the above if conditions as the below code block to
What alternative solutions did you explore? (Optional)
NA
[-][$500] Legal name - When tapping on the Legal Last Name field, the error message shouldn't switch between 'This field is required' and 'Name can only include Latin characters[/-][+][$500] Legal name - When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters[/+]tienifr commentedon Nov 15, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Switching between error messages when the message is empty in the legal name page
What is the root cause of that problem?
We already trim value in
App/src/components/Form/FormProvider.js
Line 112 in 37ddb03
but this line we did not use trimmedStringValues
Beside, when submit we call onValidate with trimmedValue
App/src/components/Form/FormProvider.js
Line 190 in 37ddb03
But when blur we just use inputeValues
App/src/components/Form/FormProvider.js
Line 272 in 37ddb03
What changes do you think we should make in order to solve the problem?
Use
trimmedStringValuesin here like we did in onSubmitResult
mananjadhav commentedon Nov 16, 2023
@Christinadobrzyn I think before I choose any proposal we should clarify, which error should be shown exactly? The expected result doesn't mention this.
143 remaining items
[-][$1000] Legal name - When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters[/-][+][Pay meow][$1000] Legal name - When tapping on the Legal Last Name field, the error message alternates between 'This field is required' and 'Name can only include Latin characters[/+]mallenexpensify commentedon Jan 31, 2024
@Christinadobrzyn this issue didn't auto update, nor remove the
Reviewinglabel. I updated, can you issue payment plz? PR hit production a few weeks ago.Christinadobrzyn commentedon Jan 31, 2024
sorry for the delay, paying out now
Payouts due:
Contributor: $1000 @bernhardoj (paid in Upwork here - https://www.upwork.com/jobs/~01df7fd3e27a4b1629)
Contributor+: $1000 @shubham1206agra (paid in Upwork here - https://www.upwork.com/jobs/~01d23451bb0027d3fd)
Eligible for 50% #urgency bonus? N
The original Upwork job is closed - @shubham1206agra can you accept my offer in this Upwork job post
shubham1206agra commentedon Feb 1, 2024
Accepted
Christinadobrzyn commentedon Feb 1, 2024
Paid out @bernhardoj and @shubham1206agra based on this payment summary - #31391 (comment)
@bernhardoj do we need a regression test for this?
bernhardoj commentedon Feb 2, 2024
@Christinadobrzyn I think it's easy to be broken, so adding a test would be good
cc: @shubham1206agra
shubham1206agra commentedon Feb 2, 2024
@Christinadobrzyn Test case
< 😶🌫️>, and observe the error<😶🌫️>), and again observe the error.<and observe the error.Christinadobrzyn commentedon Feb 2, 2024
Created a regression test GH - https://github.com/Expensify/Expensify/issues/366323
Closing this as complete. Feel free to let me know if anything is needed.