From 89e1b91020b351b98fe34b159c5596d3775af0cf Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Tue, 23 Feb 2016 17:14:49 -0500
Subject: Requires emails to contain at least 1 character before and after the
 @ sign

---
 web/react/utils/utils.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/utils/utils.jsx')

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) {
-- 
cgit v1.2.3-1-g7c22

