email regex

This commit is contained in:
genuineparts 2025-06-22 15:50:51 +02:00
parent d011255e07
commit a3b2340842

View file

@ -667,7 +667,7 @@ define(\'DEBUG\', FALSE);
if($_POST['pass']!=$_POST['passrepeat']){
$err.='<p><div class="comment"><img src="style/images/error.png" alt="" /><span style="color: red;">'.$this->t->_('Passwoerterfalsch').'</span></div></p>';
}
if(!preg_match("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['email'])){
if(empty(preg_grep("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['email']))){
$err.='<p><div class="comment"><img src="style/images/error.png" alt="" /><span style="color: red;">'.$this->t->_('Emailinkorrekt').'</span></div></p>';
}
if(!$err){