From 61049939fb4fd5c676592f3ec9839fe6d3d24c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Mon, 12 Dec 2016 18:13:49 +0800 Subject: [PATCH] Fixed email address matching regex --- botanjs/src/Astro/Blog/Components/Comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/botanjs/src/Astro/Blog/Components/Comment.js b/botanjs/src/Astro/Blog/Components/Comment.js index 5d1ccbc..953e56e 100644 --- a/botanjs/src/Astro/Blog/Components/Comment.js +++ b/botanjs/src/Astro/Blog/Components/Comment.js @@ -51,7 +51,7 @@ var validateMail = function ( str ) { - return v_match( str, /^[\_]*([a-z0-9]+(\.|\_*)?)+@([a-z][a-z0-9\-]+(\.|\-*\.))+[a-z]{2,6}$/ ); + return v_match( str, /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i ); }; var validateURL = function ( str )