public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array(array('comments, items', 'safe'), array('id, event_id', 'safe', 'on' => 'search')); }