Add validation to requestCall page and add policy check#5169
Conversation
|
@Jag96 Please let me know if you want to add the Phone number validation on the frontend as well. |
|
@parasharrajat yes I think we should add the phone number validation you mentioned in your proposal to this as well 👍 |
|
@Jag96 one Question:
|
|
Good question, commented in slack to see what the best way to handle this would be. |
|
@Jag96 Updated. Please let me know the error message and its translation in Spanish. |
|
@parasharrajat let's use this one: Line 636 in dad9ddd We no longer show it in a growl, so maybe update the name of it to |
|
Sure. thanks |
|
Updated. |
Jag96
left a comment
There was a problem hiding this comment.
Based on the updates in slack can you update this to use the solution in step 2 of #5169 (comment) so the submit button isn't disabled?
|
Ok.
|
👍
👍
We can show an error and use Line 428 in e33fcf7
Yes, that's using a different component so I'd leave that functionality the same for this PR. It looks like the growl is using |
|
@Jag96 Updated |
| this.setState({phoneNumberError: this.props.translate('requestCallPage.errorMessageInvalidPhone')}); | ||
| } | ||
| }} | ||
| onChangeText={phoneNumber => this.setState({phoneNumber, phoneNumberError: ''})} |
There was a problem hiding this comment.
It looks like clearing the phoneNumberError here is causing the error message to disappear as soon as the user starts typing, so the user can't see the phone number example as they type. Can you set the phoneNumberError to empty inside the onSubmit function instead so the error message remains until they resubmit?
dcb5fba to
c7090f4
Compare
|
Done |
Jag96
left a comment
There was a problem hiding this comment.
LGTM, thanks for updating!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@parasharrajat @Jag96 is this change behind a beta? This is working for us in expensifail accounts only. Gmail accounts are giving us an error and the PR is a fail. |
|
I was using private email and I will test using Gmail email. |
|
@parasharrajat Should these tests pass with a gmail too? or is it expected that an error is shown there? |
|
@isagoico For me, I don't see any error till step 6. On 7, I see which makes sense, I don't have any workspaces for this account. |
|
@isagoico the free plan is still under beta, so if the user isn't on the beta they will see this error message. Gmail users won't be on the beta so it is normal for them to see this error. |
|
Ohh ok got it. Thanks! Looks like we cab check it off then 🎉 |
|
This has been deployed to production and is now subject to a 7-day regression period. |
|
🚀 Deployed to production by @francoisl in version: 1.0.98-1 🚀
|

Details
#4861 (comment)
Fixed Issues
$ #4861
Tests | QA Steps
Tested On
Screenshots
Web | Mobile Web | Desktop
iOS
Android