public function post_delete_group() { $val = Validation::forge(); $val->add_callable('MyRules'); $val->add_field('group', Lang::get('label.group'), 'required|valid_group_fb'); if ($val->run()) { $id = $val->validated('group'); if (Model_Base_GroupFb::delete($id)) { $this->data['success'] = true; } } else { $this->data['errors'] = $val->error_message(); } return $this->response($this->data); }