How to validate Email in yii
Yii is a great framework for form validation,today i am going to show you how to validate the email field in the form before submitting.Its very simple just follow the below example if you created a user model with email as one attribute then in the rules function add the following code public function rules() { return array( ... array('email', 'email','checkMX'=>true), .. ); } thats it also look at the code i have added a checkMX=true(this is used for checking that domain exists),you could ignore it if you want