-
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 2021-12-06] [$250] When creating new accounts, allow users to enter their phone numbers with - and/or ( ) and spaces #6227
Comments
Triggered auto assignment to @sakluger ( |
Upwork Job posted. cc @aldo-expensify in case you want to snag this, auto-assigning via |
Triggered auto assignment to @chiragsalian ( |
After following the code, I see that the main issue is the regex that is used to validate the phone number. The function that you are using for validation can be found in expensify-common/lib/str.js 921 This can be improved, I have a regex that will solve it but I need to know are you restricting the users to follow a country specific phone pattern, would you allow users to not put in spaces, parenthesis and a plus sign or do they have to? If you provide some more details about what kind of patterns would you allow, I am more than happy to solve the issue for you. |
ProposalTwo approaches 1I allowed the bracket (
/^\+?\d*$/.test(input.replace(/((?!\n)[()-\s\t])/g, ''))
2OR we can just use the |
@parasharrajat is right, this has been introduced when we wanted to unify the error messages in this PR #5864. We should be able to just revert the commit Rajat mentioned to allow the |
Sorry, @mountiny for tagging you. I didn't correctly see the issue. We want to add it not remove it so I have updated the proposal. Now we want to extend that change and allow spaces as well. |
Proposal I had changed the phone number regex in the company VBA flow. I would want to change the validation check to
|
We are placing all non-critical issues on hold while we're on a company offsite. The hold is expected to be lifted on 11/19 (but could go longer). For any PRs that are submitted before or during the hold, we will add a $250 bonus payment. |
I'm going to go with @parasharrajat because he captured the importance of replacing the character values as well before sending it to the backend. If we send the characters to the backend I'm pretty sure it will error out. As for your 1 and 2 proposal choices @parasharrajat. I think 1 would be easier and cleaner. I don't mind solution 2 but in my limited testing Anyway feel free to create a PR @parasharrajat and @mallenexpensify feel free to hire Rajath in Upwork. |
@parasharrajat , can you apply here please? https://www.upwork.com/jobs/~01e3a9fa28fc98c96a |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.16-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 2021-12-06. 🎊 |
Ping for |
@parasharrajat Can you accept the offer here please and confirm when you have? |
Accepted it @mallenexpensify |
Paid @parasharrajat $250 for the job and $250 for company offsite hold bonus. |
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:
Flow 1:
-
,(
,)
or spaces (e.g.+1 (222) 222 2222
)Flow 2:
-
,(
,)
or spaces (e.g.+1 (222) 222 2222
)Expected Result:
The user should be able to sign in or request a call from concierge just fine . The number input by the user should be cleaned before being sent to the back-end, stripping
-
,(
,)
and spaces.Actual Result:
We get validation errors
## Platform: Where is this issue occurring? ALL
Version Number:
Reproducible in staging?:
Reproducible in production?:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/183582#
Issue reported by:
Slack conversation:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: