Getting "email Invalid" For A Real Email Address

I use the yii email validation rule, but get "email invalid" for an email with this format:

pat.riese@mail.ccsf.edu

This is a valid email address in use. Does anyone know why the yii email validation rule calls it invalid? Doesn’t the rule allow email addresses with sub domains?

Thank you for any help solving this!

hi viil,

	yes this email is not validated by yii validator, but you can try ur own validation rule for such type of mail(if it is valid) like this.............



public function rules() {   	

 return array( 		

        	array('email', 'isValidEmailAddress'), 	);

   } 




/




public function isValidEmailAddress($attribute, $params) 

{

    // viil's validation rule here like below.........


 	//if (User::model()->find('email=:email', array(':email'=>$this->email)) !== null) 	

//{    	

// $this->addError('email', 'Email account already exists');	

 //} 


}



I HOPE YOUR QUESTION WILL BE ANSWERABLE BY YII TEAM.

It is a valid email address for Yii. Maybe the problem is a trailing space?

hi andy_s I also checked this mail posted by viil…Yii is showing invalid, cud u suggest a solution plz

I checked it in my Yii 1.1.13 project and the email "pat.riese@mail.ccsf.edu" is considered valid by the CEmailValidator.

cud u plz suggest the rule in short in my yii 1.1.14 with ‘email’=>‘email’ it is not validating

just simple add these line -


array('email', 'email','message'=>"The email isn't correct"),

array('email', 'unique','message'=>'Email already exists!'),