diff --git a/wp-comments-post.php b/wp-comments-post.php index 6833c2c57..63753286d 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -31,8 +31,12 @@ endif; $comment_type = ''; -if ( (get_settings('require_name_email') && !$user_ID) && ('' == $comment_author_email || '' == $comment_author) ) - die( __('Error: please fill the required fields (name, email).') ); +if ( get_settings('require_name_email') && !$user_ID ) { + if ('' == $comment_author_email || '' == $comment_author) + die( __('Error: please fill the required fields (name, email).') ); + elseif ( !is_email($comment_author_email)) + die( __('Error: please enter a valid email address.') ); +} if ( '' == $comment_content ) die( __('Error: please type a comment.') );