validate email

Hi everyone,

how can I validate email upon creating user account.

jayar@yahoo.com =valid

jayar@=invalid

thanks…

1 Like

In your model:




public function rules()

	{

return array(

     array('email','email'),

}

}



the first email is the name of the attribute and the second is the name of the built-in validator

1 Like

thanks…

Thank you very much

Although small point , But Very helpful

how do i check or validate the domain for eg vvv@fff.com is accepted which shouldnt be the case … pls help.

The only sure way to validate an email address is to send an email with a verification code or link. Determining that an address is syntactically valid doesn’t prove that it exists or belongs to the person who submitted it.

realy helpful