|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-11-12 14:56 UTC] andrew dot nicols at luns dot net dot uk
Description:
------------
The filter_var function, when used with FILTER_VALIDATE_EMAIL marks an email address with an = in it as invalid.
According to RFCs 822, 2822 and 5322, = is a valid component to the local-part of an e-mail address.
Reproduce code:
---------------
<?php
$email_address = "[email protected]";
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
$email_address = "[email protected]";
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
$email_address = "[email protected]";
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
?>
Expected result:
----------------
string(21) "[email protected]"
string(21) "[email protected]"
string(21) "[email protected]"
Actual result:
--------------
bool(false)
string(21) "[email protected]"
string(21) "[email protected]"
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 29 14:00:01 2025 UTC |
Yes, = is valid. And also any of these too: ! $ & * - = ^ ` | ~ # % ' + / ? _ { }