]> git.mxchange.org Git - friendica.git/commitdiff
improve the email regex a bit more
authorfriendica <info@friendica.com>
Fri, 16 Dec 2011 22:31:39 +0000 (14:31 -0800)
committerfriendica <info@friendica.com>
Fri, 16 Dec 2011 22:31:39 +0000 (14:31 -0800)
include/text.php

index 5e9c3933629146a7111380fc7707948254a472bf..d6b3ceeab40600ac1c7f54b452c7856c694eeebb 100644 (file)
@@ -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;
 }}