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