Example #1
0
 /**
  * @return array validation rules for model attributes.
  */
 public function rules()
 {
     // NOTE: you should only define rules for those attributes that
     // will receive user inputs.
     return array_merge(parent::rules(), array(array('email, username', 'unique'), array('email', 'email')));
 }