ID: 49576 Updated by: [email protected] Reported By: mparkin at de-facto dot com -Status: Open +Status: Feedback Bug Type: Filter related Operating System: OSX Leopard PHP Version: 5.2.10 New Comment:
Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2009-09-17 08:53:51] mparkin at de-facto dot com Description: ------------ Filter_Var does not validate emails accurately enough, and false positives are made. The regex needs improving - the regex we are using in kohanaphp framework (with preg_match) is more accurate. some more reading could be done here: http://fightingforalostcause.net/misc/2006/compare-email-regex.php Reproduce code: --------------- http://codepad.org/UIrhI5ep Expected result: ---------------- All emails in $valid are valid, all emails in $invalid are invalid. A far more accurate regex can be found here: http://dev.kohanaphp.com/projects/kohana2/repository/entry/trunk/system/helpers/valid.php#L20 Actual result: -------------- There are false positives and non failures. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49576&edit=1
