php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52170 FILTER_VALIDATE_EMAIL Error
Submitted: 2010-06-24 12:40 UTC Modified: 2010-06-24 15:52 UTC
From: francesco dot mortara at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.2 OS: Windows XP Pro SP3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: francesco dot mortara at gmail dot com
New email:
PHP Version: OS:

 

 [2010-06-24 12:40 UTC] francesco dot mortara at gmail dot com
Description:
------------
Email validation fail with php embed function filter_var.

The code below validate an email like user@domain without any TLD

Test script:
---------------
$email = filter_var('user@domain', FILTER_VALIDATE_EMAIL);

if($email === false) {
	return false;
}


Expected result:
----------------
Email should be not valid

Actual result:
--------------
Email pas the validation filter

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-24 13:37 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2010-06-24 13:37 UTC] aharvey@php.net
E-mail addresses without TLDs are valid: FILTER_VALIDATE_EMAIL checks for syntactic validity, not necessarily actual e-mailability. You may want to look at getmxrr().

See also about half of the bugs on this list: http://p70.us/k
 [2010-06-24 15:52 UTC] rasmus@php.net
Try 5.3.3 - the email filter has been improved.  Also see bug #49576
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 17:01:34 2025 UTC