Fixed email address matching regex

This commit is contained in:
斟酌 鵬兄 2016-12-12 18:13:49 +08:00
parent 5e48868fa8
commit 61049939fb

View File

@ -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 )