|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-11-17 16:06 UTC] rasmus@php.net
[2009-11-17 18:14 UTC] brian dot sulzen at aescreations dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 11:00:01 2025 UTC |
Description: ------------ FILTER_VALIDATE_EMAIL is passes addresses with out top level domain (i.e., .com, .net, etc). Reproduce code: --------------- <?php $email_address = "test2_mail@example"; var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); $email_address = "test-mail@example.com"; var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); $email_address = "test+mail@example.com"; var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); ?> Expected result: ---------------- bool(false) string(21) "test-mail@example.com" string(21) "test+mail@example.com" Actual result: -------------- string(18) "test2_mail@example" string(21) "test-mail@example.com" string(21) "test+mail@example.com"