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:
- Open new Expensify.
- Log out if already logged in
- Login using a phone number, enter the phone number without country code
Expected Result:
While entering it should have shown the message
Please enter a phone number including the country code e.g +447814266907
Actual Result:
Only after press continue an error message is shown.
While Entering

After pressing continue

Workaround:
Yes users can add country code after an error shows up
Proposal
We already had a similar issue in search we can use the same check for phoneNumber
In LoginForm.js
|
onChangeText={text => this.setState({login: text})} |
|
onSubmitEditing={this.validateAndSubmitForm} |
|
autoCapitalize="none" |
|
autoCorrect={false} |
|
keyboardType={getEmailKeyboardType()} |
|
placeholder={this.props.translate('loginForm.phoneOrEmail')} |
|
placeholderTextColor={themeColors.placeholderText} |
|
autoFocus={canFocusInputOnScreenFocus()} |
|
/> |
|
</View> |
add these lines below,
{this.state.login
&& !CONST.REGEX.DIGITS_AND_PLUS.test(this.state.login) && Str.isValidPhone(this.state.login)
&& (
<Text style={[styles.formError]}>
{this.props.translate('messages.noPhoneNumber')}
</Text>
)}
Will change styles based on input from the team.
Also, we can move the phone validation logic to Str.js in expensify-common, if needed, and use the same in other places
Platforms
Where the issue is occuring?
Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
View all open jobs on Upwork
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:
While entering it should have shown the message
Please enter a phone number including the country code e.g +447814266907
Actual Result:
Only after press continue an error message is shown.
While Entering
After pressing continue
Workaround:
Yes users can add country code after an error shows up
Proposal
We already had a similar issue in search we can use the same check for phoneNumber
In
LoginForm.jsApp/src/pages/signin/LoginForm.js
Lines 81 to 90 in 474a149
add these lines below,
Will change styles based on input from the team.
Also, we can move the phone validation logic to
Str.jsin expensify-common, if needed, and use the same in other placesPlatforms
Where the issue is occuring?
Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
View all open jobs on Upwork