Req #55122 [Opn->Bgs]: FILTER_VALIDATE_EMAIL
| From: | rasmus@php.net | Date: | Sun, 03 Jul 2011 22:21:55 +0000 |
| Subject: | Req #55122 [Opn->Bgs]: FILTER_VALIDATE_EMAIL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161548@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55122&edit=1
ID: 55122
Updated by: rasmus@php.net
Reported by: zachary at stolertech dot com
Summary: FILTER_VALIDATE_EMAIL
-Status: Open
+Status: Bogus
Type: Feature/Change Request
Package: Filter related
Operating System: Microsoft Windows v6.1.7601
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
This is not a valid email address since 123.456.789.0 is an invalid ip. Try 123.123.123.0 as a test
ip instead.
Previous Comments:
------------------------------------------------------------------------
[2011-07-03 17:53:20] zachary at stolertech dot com
Description:
------------
The FILTER_VALIDATE_EMAIL filter does not work as it should. If you include an IP address in your
email address it filters as not valid.
The email we use for this experiment is php@[123.456.789.0], a fully valid email address. We also
tested php@123.456.789.0 and its validates as FALSE.
Test script:
---------------
<?php
$emailwithip = "php@[123.456.789.0]";
if(!filter_var($emailwithip, FILTER_VALIDATE_EMAIL)) {
echo "EMAIL INVALID"; //Unexpected Result
} else {
echo "EMAIL VALID"; //Expected Correct Result
}
?>
Expected result:
----------------
TRUE
Actual result:
--------------
FALSE
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55122&edit=1