phpcodeignitervalidationgetmethod

Form validation not working with form GET method


I'm trying to post my form by method="GET" instead of POST.

Codeigniter's form_validation->run() doesn't work.

It's not returning any form_error in view page.


Solution

  • If you have to use $_GET, you could set the validation data before the validation rules :

    $this->form_validation->set_data($_GET);
    

    See : Validating an Array (other than $_POST)