-
Notifications
You must be signed in to change notification settings - Fork 3k
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
VBA Fields validation #5531
VBA Fields validation #5531
Conversation
@puneetlath We might have to update the placeholder for |
@akshayasalvi Regarding the phone number placeholder, I think it's fine to just use Also, I think you should use |
Hey @akshayasalvi, great job so far on this issue. 👍 We are wanting to push through all issues related to this flow very quickly, so it's possible that I'll end up taking this PR and finishing it personally. Rest assured, you will still get paid as if you completed this issue. I'll check back in tomorrow and make a determination then. |
Same placeholder in Spanish too?
I had seen that but it seems our current
Thank you
Okay both the changes that you've mentioned have follow-up questions. Can you help so that I'll update the PR at the earliest? |
That's a good point. For Spanish, lets do |
You also offered taking out the parentheses in that comment, which sounds like a fine solution to me. We don't need to make that a separate method, just do it in one line. |
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.
I think this is looking really good. Let me know what you think about my concern with de-coupling the max length of phone numbers and their symbols.
…-validation # Conflicts: # src/pages/ReimbursementAccount/CompanyStep.js # src/pages/ReimbursementAccount/IdentityForm.js
@Luke9389 I've updated the regex with length check on the numbers. I've also added an additional max length check in the function itself. Also, I saw two conflicts where I've picked my changes. I insist on keeping my change |
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.
Getting closer, just a few more questions. Thanks!
…-validation # Conflicts: # src/libs/ValidationUtils.js # src/pages/ReimbursementAccount/CompanyStep.js
PR updated |
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.
Before merging I'd like to verify that you've tested these changes since the most recent commit. I ask all my contributors this question because it's easy to assume our commits don't break anything, and then they cause regressions. Lets get you paid on time :)
Yes tested :) |
…-validation # Conflicts: # src/libs/ValidationUtils.js
@Luke9389 Resolved and tested again |
@akshayasalvi Looks like there's another conflict. |
Ohh no :( |
Heh, it's OK! No worries, just be sure you're merging with the most recent version of our |
…-validation # Conflicts: # src/pages/ReimbursementAccount/IdentityForm.js
Resolved again and tested
Yeah, I do it every time. It is just other changes are getting merged and resulting in conflicts. I am guessing these screens are under active development. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
This issue is failing this PR #5705 |
Hm, that seems like a separate issue rather than a regression caused by this PR. This PR just enforces that what is entered is the right type and length. But doesn't do any validation on whether the numbers entered are valid. So I don't think we need to block this PR based on that. |
oh ok then the PR is a pass! Checking it off and removing the deploy blocker label |
As long as @kavimuru used the correct number of zeros in the phone number. If they were able to pass this step with just one zero for a phone number, then I think that's a problem for this PR. |
🚀 Deployed to production by @chiragsalian in version: 1.1.6-0 🚀
|
Yeah, it allows because our current regex also allows 3 digit numbers. This one adds support for brackets, etc. in US format, yet allows you to add 2-3 digit numbers as per E164 |
Yes, that's good. But what 3 digit number are they entering that we should accept as a phone number? |
Good question. I am not sure then what would be the expected values. Can you help me and accordingly I'll update the regex. This is the current regex: |
Yea, we should have enforced a minimum character amount. A quick search turned up with 5 as the absolute minimum number of digits (Solomon Islands). Runner up is Sweden at 7. |
Nice. Should we create a new issue? It'd be great to try and avoid any situation where a user is able to do something that we can catch with front end validation instead of in the back end. |
Yea, I'm fine with just spinning one up real quick and doing it. I don't think it's worth Exporting. Before I do that though, do you think we should try to factor in location to this check? We could look at the address they've provided (if they've done that field) and/or use an IP goelocation lookup? As I'm writing this it sounds like overkill, but I'd like to prevent someone from providing a 5 digit phone number (likely as an accident). What do you think? |
Good thoughts, but agree with it being overkill for now. The case I was running into specifically is that I had an area code previously saved auto-filling in this input so adding a minimum like 5 digits here seems like a high value improvement given the complexity added. |
K, I'll just spin this up and do it. 👍 |
@puneetlath Can you please review this?
Details
Fixed Issues
$ #5184
Tests
QA Steps
There are two forms where the validation is added.
Company Step
bank-account/company-step
zipCode
,taxIDNumber
andphoneNumber
Save & Continue
Requestor Step
bank-account/personal-information
ssn
Save & Continue
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android