diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-02-23 17:14:49 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2016-02-23 17:14:49 -0500 |
commit | 89e1b91020b351b98fe34b159c5596d3775af0cf (patch) | |
tree | 5f298f6958331520e8ee6a9c8dc2759940c66bf0 /web | |
parent | 52767d9dcdc84fca4cd7a5b5c7ece2650691b91d (diff) | |
download | chat-89e1b91020b351b98fe34b159c5596d3775af0cf.tar.gz chat-89e1b91020b351b98fe34b159c5596d3775af0cf.tar.bz2 chat-89e1b91020b351b98fe34b159c5596d3775af0cf.zip |
Requires emails to contain at least 1 character before and after the @ sign
Diffstat (limited to 'web')
-rw-r--r-- | web/react/utils/utils.jsx | 2 |
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) { |