|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-04-22 10:00 UTC] m dot vdhulst at puredutch dot nl
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. as reported in bugreport http://bugs.php.net/bug.php?id=47879 nice to have the option to: select whether it has to check if its an internal address or a non internal address. Reproduce code: --------------- var_dump(filter_var("x@y.z", FILTER_VALIDATE_EMAIL)); Expected result: ---------------- bool(false) Actual result: -------------- string(5) "x@y.z" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 09:00:02 2025 UTC |
[UPDATED] Reproduce code: --------------- var_dump(filter_var("x@y", FILTER_VALIDATE_EMAIL)); Expected result: ---------------- bool(false) Actual result: -------------- string(3) "x@y" as shown this will result to true, but this is not a valid email adress. I would like to see additional flags, f.ex.: FILTER_VALIDATE_EMAIL_INTERNAL, respectively FILTER_VALIDATE_EMAIL_INTERNATIONAL.