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

Bug #10044 email validation bug
Submitted: 2007-02-07 06:08 UTC Modified: 2007-03-05 13:51 UTC
From: ronin_san at rednoize dot com Assigned: davidc
Status: Closed Package: Validate (version CVS)
PHP Version: Irrelevant OS: suse/mandrake
Roadmaps: 0.8.0    
Subscription  


 [2007-02-07 06:08 UTC] ronin_san at rednoize dot com (biophonc)
Description: ------------ script returns true when validating an (wrong) email but that's not the expected result. after the last period there should be max 4 letters valid(.mobi, .info, .name). Test script: --------------- <?php var_dump(Validate::email('iam.someone@example.commmmasd')); ?> Expected result: ---------------- false Actual result: -------------- true

Comments

 [2007-02-22 09:25 UTC] ash at hexmen dot com (Ash Searle)
TLDs are regularly added, so if anyone 'fixes' this, it should be considered temporary. Note: there are two 6-letter TLDs: 'travel' and 'museum' http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
 [2007-02-26 14:14 UTC] davidc (David Coallier)
I was thinking of making an array of domain extensions for handling itld, gtld, cctld, etc. So that one could also pass something like : $valid = Validate::email('davidc@php.net', 'gtld'); and that would go and validate only against the gTLD's. Same thing for all other known extensions. Would everyone be happy with that ?
 [2007-02-26 16:44 UTC] ronin_san at rednoize dot com
@ash: I wasn't aware of 6 letter long domains when i have posted this. Good point - my fault. @david: that would be perfect! :)
 [2007-03-05 11:09 UTC] davidc (David Coallier)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2007-03-05 13:18 UTC] davidc (David Coallier)
Sorry, wasn't conform to the validate's internal coding style.I reverted what was in cvs and reopened the bug and unassigned me.
 [2007-03-05 13:51 UTC] davidc (David Coallier)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.