PHP Classes

Returned result do not correlate documentation

Recommend this page to a friend!

      PHP Email validation  >  All threads  >  Returned result do not correlate...  >  (Un) Subscribe thread alerts  
Subject:Returned result do not correlate...
Summary:result returned by the validator do not correlate documentation
Messages:3
Author:Luke Grenncastle
Date:2015-02-09 02:50:08
 

  1. Returned result do not correlate...   Reply   Report abuse  
Picture of Luke Grenncastle Luke Grenncastle - 2015-02-09 02:50:08
Hi Manuel,

Your class seems to work although when I check the documentation its states the following status:
EMAIL_VALIDATION_STATUS OK = 0;

EMAIL_VALIDATION_STATUS TEMPORARY_SMTP_REJECTION = -1;
EMAIL_VALIDATION_STATUS SMTP_DIALOG_REJECTION = -2;
EMAIL_VALIDATION_STATUS SMTP_CONNECTION_FAILED = -3;

EMAIL_VALIDATION_STATUS BANNED_WORDS_IN_USER = 1;
EMAIL_VALIDATION_STATUS BANNED_DOMAIN = 2;
EMAIL_VALIDATION_STATUS FAKE_DOMAIN = 3;
EMAIL_VALIDATION_STATUS TYPO_IN_DOMAIN = 4;
EMAIL_VALIDATION_STATUS DISPOSABLE_ADDRESS = 5;
EMAIL_VALIDATION_STATUS TEMPORARY_DOMAIN = 6;
EMAIL_VALIDATION_STATUS SPAM_TRAP_ADDRESS = 7;
EMAIL_VALIDATION_STATUS BANNED_SERVER_DOMAIN = 8;
EMAIL_VALIDATION_STATUS BANNED_SERVER_IP = 9;
EMAIL_VALIDATION_STATUS BANNED_SERVER_REVERSE_IP = 10;

But testing your class I get result=1 when its a valid email. Am i misunderstanding or mixing something in your documentation ?
Thank you for your assistance!

  2. Re: Returned result do not correlate...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-02-09 03:44:41 - In reply to message 1 from Luke Grenncastle
Those are values for the validation_status_code variable that you should check when the email is considered invalid. So it has nothing to do with the value returned in the $valid parameter returned by the Validate function.

  3. Re: Returned result do not correlate...   Reply   Report abuse  
Picture of Luke Grenncastle Luke Grenncastle - 2015-02-09 04:53:08 - In reply to message 2 from Manuel Lemos
ok, thanks for clarifying this.
Super class by the way! :)