Although this is old topic, but i thing someone can get this error as me just get it.
We can't use CI set_message function for CroceryCrud validation. Because CroceryCrud use its validation object.
You can edit libraries/Grocery_CRUD.php, find line "protected function form_validation()",
at under this function, you can copy it, rename and edit access modifiler to public :
public function get_form_validation(){
if($this->form_validation === null)
{
$this->form_validation = new grocery_CRUD_Form_validation();
$ci = &get_instance();
$ci->load->library('form_validation');
$ci->form_validation = $this->form_validation;
}
return $this->form_validation;
}
Now, you can call it in your controller :
$crud-> get_form_validation()->set_message('check_city',"invail %s");