summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-02-24 08:37:45 -0500
committerJoram Wilander <jwawilander@gmail.com>2016-02-24 08:37:45 -0500
commitc0677c190d8d8c0350c69156ab6518120a2af1d1 (patch)
tree30ee67923c2408e85e44e08802fecfb7d315861d /web
parentb7aa65cedd64b705c4716594e5e8e3fdaddcbb70 (diff)
parent89e1b91020b351b98fe34b159c5596d3775af0cf (diff)
downloadchat-c0677c190d8d8c0350c69156ab6518120a2af1d1.tar.gz
chat-c0677c190d8d8c0350c69156ab6518120a2af1d1.tar.bz2
chat-c0677c190d8d8c0350c69156ab6518120a2af1d1.zip
Merge pull request #2234 from hmhealey/plt1669
PLT-1669 Slightly increase requirements for a valid email on the client
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/utils.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index fd250ad10..41d93174e 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -19,7 +19,7 @@ import {FormattedTime} from 'mm-intl';
export function isEmail(email) {
// writing a regex to match all valid email addresses is really, really hard (see http://stackoverflow.com/a/201378)
// so we just do a simple check and rely on a verification email to tell if it's a real address
- return email.indexOf('@') !== -1;
+ return (/^.+@.+$/).test(email);
}
export function cleanUpUrlable(input) {