php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47879 FILTER_VALIDATE_EMAIL Error
Submitted: 2009-04-02 15:51 UTC Modified: 2009-04-02 21:07 UTC
From: cory dot jacobsen at zu dot com Assigned:
Status: Not a bug Package: Filter related
PHP Version: 5.2.9 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
21 + 39 = ?
Subscribe to this entry?

 
 [2009-04-02 15:51 UTC] cory dot jacobsen at zu dot com
Description:
------------
Some email addresses that are obviously wrong, pass the validation with
FILTER_VALIDATE_EMAIL.  You can not have a top level domain with one character only.

Reproduce code:
---------------
var_dump(filter_var("x@y.z", FILTER_VALIDATE_EMAIL));

Expected result:
----------------
bool(false)

Actual result:
--------------
string(5) "x@y.z"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-02 21:07 UTC] iliaa@php.net
Actually you can if its an internal domain name.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 23:03:47 2022 UTC