Reputation: 377
I'm using the Codeigniter (v3) form validation library, without the form helper (using ajax).
$this->load->library('form_validation');
$this->form_validation->set_rules('name', 'Name', 'required');
if ($this->form_validation->run() == FALSE){
$data["errors"] = $this->form_validation->error_array();
}
When no name is given, $data["errors"] is created. But the array is empty. Any idea what is going wrong?
Upvotes: 2
Views: 2575
Reputation: 377
This seems to be resolved in the latest version of Codeigniter, released today. https://codeigniter.com/user_guide/changelog.html?highlight=4312
Upvotes: 1