improve the email regex a bit more
This commit is contained in:
parent
690b3f57b7
commit
22d59350e9
|
@ -635,7 +635,7 @@ function search($s,$id='search-box',$url='/search',$save = false) {
|
|||
|
||||
if(! function_exists('valid_email')) {
|
||||
function valid_email($x){
|
||||
if(preg_match('/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x))
|
||||
if(preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x))
|
||||
return true;
|
||||
return false;
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue