public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(array('description', 'safe'), array('description', 'required', 'message' => '{attribute} cannot be blank when there are no child elements', 'on' => 'formHasNoChildren'), array('id, event_id, description, ', 'safe', 'on' => 'search'));
}