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

Bug #17279 Validate::email() with 'fullTLDValidation' => 'true' always return false.
Submitted: 2010-03-30 16:46 UTC
From: fzhan Assigned: amir
Status: Closed Package: Validate (version SVN)
PHP Version: 5.3.0 OS: linux
Roadmaps: (Not assigned)    

 [2010-03-30 16:46 UTC] fzhan (Fan Zhang)
Description: ------------ There's actually not fix on that since in the code itself states: " /** * @todo Fix bug here.. even if it passes this, it won't be passing * The regular expression below */ " Even with the updates of Net_IDNA from svn does not make this work. Test script: --------------- require_once 'Validate.php'; var_dump(Validate::email('', array('fullTLDValidation' => true,'use_rfc822' => true))); Expected result: ---------------- bool(true) Actual result: -------------- bool(false)


 [2010-03-31 09:06 UTC] doconnor (Daniel O'Connor)
Looking at the code, you have to add in some of the validations you want to use. ie: if(!empty($options["VALIDATE_ITLD_EMAILS"])) array_push($validate, 'itld'); if(!empty($options["VALIDATE_GTLD_EMAILS"])) array_push($validate, 'gtld'); if(!empty($options["VALIDATE_CCTLD_EMAILS"])) array_push($validate, 'cctld'); I can't decide if it should raise a PEAR_Error, or return 'false' like it does.
 [2011-03-30 15:37 UTC] amir (Amir Mohammad Saied)
-Status: Open +Status: Closed -Assigned To: +Assigned To: amir
Now if you don't provide a TLD option, fullTLDValidation would check against all possible options. One can overwrite this behavior by supplying specific options.