Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Bug #19143 user@yahoo..com reported as a valid email address
Submitted: 2011-12-19 00:00 UTC
From: bufny Assigned:
Status: Bogus Package: Validate (version 0.8.5)
PHP Version: 5.3.0 OS: Windows 7, Linux
Roadmaps: (Not assigned)    
Subscription  


 [2011-12-19 00:00 UTC] bufny (Darius Bufnea)
Description: ------------ Bug in email method of Validate class. Incorrect e-mail address reported as valid. Test script: --------------- <?php require_once("Validate.php"); $validator = new Validate(); $email = "user@yahoo..com"; if ($validator->email($email)) print "$email is a valid email address\n"; else print "$email is not a valid email address\n"; ?> Expected result: ---------------- user@yahoo..com is not a valid email address

Comments

 [2011-12-19 00:19 UTC] bufny (Darius Bufnea)
-Summary: user@yahoo..com reported as valid email address +Summary: user@yahoo..com reported as a valid email address -Operating System: Windows 7 +Operating System: Windows 7, Linux
 [2011-12-19 17:21 UTC] doconnor (Daniel O'Connor)
Thanks for the report - how annoying, all of our tests were passing happily.
 [2011-12-19 17:23 UTC] doconnor (Daniel O'Connor)
Well, at least it's not regression from the release. clockwerx@clockwerx-desktop:~$ pear list | grep Validate Validate 0.8.3 beta and clockwerx@clockwerx-desktop:~$ php bar.php user@yahoo..com is a valid email address
 [2011-12-19 17:23 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Verified
 [2011-12-19 17:43 UTC] doconnor (Daniel O'Connor)
-Status: Verified +Status: Bogus
So - try : <?php require_once("Validate.php"); $validator = new Validate(); $email = "user@yahoo..com"; if ($validator->email($email, array('use_rfc822' => true))) print "$email is a valid email address\n"; else print "$email is not a valid email address\n"; Annoying that by default it's not this strict, but if you ask it to be... voila. clockwerx@clockwerx-desktop:~$ php bar.php user@yahoo..com is not a valid email address
 [2011-12-20 01:22 UTC] bufny (Darius Bufnea)
Thank you for clarifying this. I apologize for the bogus report.