Search code examples
codeignitercodeigniter-2

CodeIgniter Validation: possible to validate GET query strings?


The form validation library seems to only work on POST. I need to use query strings and would like to use CI to validate the passed values. Is there a way to do this?


Solution

  • The current Codeigniter 3.0 development branch provides an option to insert your own variable instead of $_POST. So you could start using 3.0.

    Alternatively, the only way in CI2.1 is to do $_POST=$_GET before you run the validation.