Skip to content

Commit

Permalink
adds missing regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Greer committed Apr 13, 2024
1 parent 06c7895 commit 28ae093
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SampleApp/javascript/js/SettingsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class SettingsTab extends Component {
}
renderLoggedOut() {
console.log("renderLoggedOut");
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
return (React.createElement(View, { style: styles.emailContainer },
React.createElement(TextInput, { value: this.state.email, style: styles.emailTextInput, autoCapitalize: "none", autoCompleteType: emailRegex.test(this.state.email) ? "email" : "none", onChangeText: (text) => this.setState({ isLoggedIn: false, email: text }), placeholder: "[email protected]/userId" }),
React.createElement(Button, { title: "Login", onPress: this.onLoginTapped })));
Expand Down

0 comments on commit 28ae093

Please sign in to comment.