improve the email regex a bit more
This commit is contained in:
parent
690b3f57b7
commit
22d59350e9
1 changed files with 1 additions and 1 deletions
|
@ -635,7 +635,7 @@ function search($s,$id='search-box',$url='/search',$save = false) {
|
||||||
|
|
||||||
if(! function_exists('valid_email')) {
|
if(! function_exists('valid_email')) {
|
||||||
function valid_email($x){
|
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 true;
|
||||||
return false;
|
return false;
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in a new issue