validate email

Hi everyone,

how can I validate email upon creating user account. =valid



1 Like

In your model:

public function rules()


return array(




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

1 Like


Thank you very much

Although small point , But Very helpful

how do i check or validate the domain for eg 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