From 28ae093483feee170ddc6b2e7dc23b14fa9b47bb Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Sat, 13 Apr 2024 12:59:24 -0600 Subject: [PATCH] adds missing regex --- SampleApp/javascript/js/SettingsTab.js | 1 + 1 file changed, 1 insertion(+) diff --git a/SampleApp/javascript/js/SettingsTab.js b/SampleApp/javascript/js/SettingsTab.js index 332bf1890..48792bc8d 100644 --- a/SampleApp/javascript/js/SettingsTab.js +++ b/SampleApp/javascript/js/SettingsTab.js @@ -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: "user@example.com/userId" }), React.createElement(Button, { title: "Login", onPress: this.onLoginTapped })));