-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2023-10-23][$500] Web - Account Settings - Inappropriate error message when add Legal name in non-English alphabet #28250
Comments
Triggered auto assignment to @lschurr ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Validation message showed "Name can only include letters" when user tried to update their name with Cyrillic alphabet characters. What is the root cause of that problem?We're currently validating our first name with alphabetic and latin character, in this case, we're using Cyrillic alphabet, which caused the issue. App/src/libs/ValidationUtils.js Lines 374 to 376 in 52c3f53
What changes do you think we should make in order to solve the problem?We should change the error message to make it more meaning full: Line 971 in 52c3f53
Line 968 in 52c3f53
Also update the error message in Spanish as well What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~0173b61987caa93a3d |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
Hey there, ran into this issue on Upwork and would be happy to help out. I might need a bit of clarification on the expected result here. I am assuming that ProposalIf the issue is simply that the error message needs to be updated, then I would update the English and Spanish string values for |
📣 @lncramer! 📣
|
Hi, folks, please describe the problem in your own words, rather than just copying the title. : ) Additionally, @lncramer, I'm glad you're interested in this project. Please follow our contributor guidelines, which have detailed steps on how to get involved. : ) |
Thanks for reminding 😃 I've just updated my proposal |
PROPOSAL: Root Cause: My application initially lacked a proper validation mechanism to ensure users entered legal names using only Latin characters. This oversight might lead to data inconsistencies or issues in systems that expect legal names to have Latin characters. Solution: Defined a Validation Function: I implemented a utility function isValidLegalName(name) to check the validity of a legal name. First, it checks for any non-Latin characters using the regex /[^ -~]+/, which matches any character outside the ASCII printable characters range. In the form validation logic, I used the isValidLegalName utility function to perform checks: If the name contains non-Latin characters, it triggers an error message: 'privatePersonalDetails.error.nonLatinCharacter'. |
📣 @HCanArslan! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
I remember we discussed the regex pattern for names before, and it seems it also involved the backend, need to find that discussion first to confirm. 🤔 |
I defined a utility function named isValidLegalName within ValidationUtils.ts which uses regular expressions to validate a provided name, ensuring that it does not contain non-Latin or special characters. Then I employed the regex pattern to detect non-Latin characters and I implemented a validate function that checks both legalFirstName and legalLastName fields against various conditions. When a validation fails, the associated error message (like 'privatePersonalDetails.error.nonLatinCharacter') is assigned, which likely corresponds to a user-facing error message. I could not find anything about backend that possibly involved with this issue. |
I think one regular expression is enough, and I don't see the necessity to add another one. The expected result in the OP seems very simple on the surface, we just need to update an appropriate error message. (e.g., By the way, @hungvu193, this is a suggestion given to you by Google's Bard for your proposal: In fact, there are some interesting things worth exploring and summarizing, they may be out of the scope of this specific issue, but I believe they could be helpful for dealing with similar issues in the future. Here is the revision history related to the legal name validation:
Another interesting thing, according to my tests, our backend now only supports a small subset of Latin characters, it seems to be Finally, I think it's okay to assign this issue to @hungvu193, because their proposal is closest to the expected result, and since I have provided the full context, they should also be capable of implementing it even if we want to align the regex patterns. : ) 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@NikkiWines could you take a look at this one? |
Yep, @hungvu193's proposal looks good to me as well. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-20. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-20. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-23. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-23. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@ntdiary, @hungvu193, @NikkiWines, @lschurr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
this is not a regression, just a translation improvement. |
Payment summary:
|
@ntdiary - please accept the offer in Upwork! https://www.upwork.com/nx/wm/offer/27031539 |
@lschurr Accepted. : ) |
This is done. Closing! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Error message should be appropriate, for example - Please enter a name using Latin characters
Actual Result:
Inappropriate error message (Name can only include letters.) appears when User add Legal name in non-English alphabet
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.74-1
Reproducible in staging?: Y
Reproducible in production?: Y
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
Notes/Photos/Videos: Any additional supporting documentation
Bug6214634_20230926_023604.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: