-
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
[HOLD for payment 2021-11-04] PayPal.me - Don't allow spaces or special characters when adding a PayPal.me #5541
Comments
Triggered auto assignment to @pecanoro ( |
Solution: We add a validate function and error in
and then accordingly add translations in en.js and es.js |
Triggered auto assignment to @michaelhaxhiu ( |
Proposalclass AddPayPalMePage extends React.Component {
constructor(props) {
super(props);
this.state = {
payPalMeUsername: props.payPalMeUsername,
paypalError:false // NEW
};
this.setPayPalMeUsername = this.setPayPalMeUsername.bind(this);
this.paypalUsernameInputRef = null;
}
// Rest of code ...
handleTextChange(text){ // NEW
if(/\s/.test(text)){
this.setState({error:true})
}
this.setState({payPalMeUsername: text})
}
render() {
return (
// Rest of code ...
<ExpensiTextInput
label={this.props.translate('addPayPalMePage.payPalMe')}
ref={el => this.paypalUsernameInputRef = el}
autoCompleteType="off"
autoCorrect={false}
value={this.state.payPalMeUsername}
placeholder={this.props.translate('addPayPalMePage.yourPayPalUsername')}
onChangeText={this.handleTextChange} // NEW
returnKeyType="done"
/>
//Rest of code
<Button
success
isDisabled={error} // NEW
onPress={this.setPayPalMeUsername}
pressOnEnter
style={[styles.mt3]}
text={this.props.payPalMeUsername
? this.props.translate('addPayPalMePage.editPayPalAccount')
: this.props.translate('addPayPalMePage.addPayPalAccount')}
/>
);
}
} |
I'm not able to reproduce this on web or iOS. When I tap "Payments" I get stuck on this white page. @isagoico were you able to reproduce this one on your side? |
I'm not able to even view those option. I made a GH here - #5601 |
Triggered auto assignment to @arielgreen ( |
I'm re-applying the Associated bug is filed already |
Triggered auto assignment to @deetergp ( |
Please refer to this post for updated information on the |
@deetergp quick reminder for the proposal #5541 (comment) |
@akshayasalvi's solution looks good for the most part. I'd love some reference that proves |
@deetergp You're right can remove the capture group. Here's the screencast while adding any space or a special character it doesn't allow and surrounds with a red border. Only numbers and characters work. So it seems the regex will get updates to remove _ and -. Updated regex Screencast Screen.Recording.2021-10-12.at.1.44.09.AM.mov |
Thanks for the added context @akshayasalvi. @arielgreen let's hire @akshayasalvi in Upwork. |
Settle down Melvin, this has already been merged. |
Apologies for the delay @akshayasalvi ! I've sent over the offer. You'll also be paid the $250 bonus for reporting this, as well as the $250 |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.10-2 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-11-04. 🎊 |
Paid! |
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:
User should not be able to save a username with spaces and special characters
Actual Result:
User is able to save the PayPal.me username with spaces and special characters
Workaround:
None needed.
Platform:
Where is this issue occurring?
Version Number: 1.1.2-5
Reproducible in staging?: yes
Reproducible in production?: yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @akshayasalvi
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1632504499064300
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: