2

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?

2
  • 1
    Check what validation_errors() returns. Commented Jan 13, 2016 at 16:35
  • An empty array. But updating Codeigniter solved the issue. Commented Jan 14, 2016 at 8:28

1 Answer 1

1

This seems to be resolved in the latest version of Codeigniter, released today. https://codeigniter.com/user_guide/changelog.html?highlight=4312

1
  • this url returning 404 - File Not Found Commented Sep 25, 2020 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.