summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorJoel Vasallo <joelvasallo@gmail.com>2015-10-16 11:26:28 -0500
committerJoel Vasallo <joelvasallo@gmail.com>2015-10-16 11:36:07 -0500
commit6e350cb9b9f5641fc553c55d43c07e1bcd9f2756 (patch)
tree1f779a8dc58388fde42ba7b74ec398dffcc3598a /web/react/utils/utils.jsx
parent3bd0a15341a5cff29c172aed73cda688e63fb7e7 (diff)
downloadchat-6e350cb9b9f5641fc553c55d43c07e1bcd9f2756.tar.gz
chat-6e350cb9b9f5641fc553c55d43c07e1bcd9f2756.tar.bz2
chat-6e350cb9b9f5641fc553c55d43c07e1bcd9f2756.zip
Updated Email Check Regex to RFC5322 Standard
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 561c2c4c4..38ac68d58 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -13,7 +13,8 @@ var client = require('./client.jsx');
var Autolinker = require('autolinker');
export function isEmail(email) {
- var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
+ //var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
+ var regex = /^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i;
return regex.test(email);
}