problem with form_validation |
hi guys,
I had some troubles today with the form_validation lib, when i run the validation from a controller inside a folder with an uri like that Code: /folder/controller/method with an uri like that Code: /controller/method is that a bug ?
Since most of my controllers are nested inside directories, I'm going to say no, but you probably need to show some code for anyone to be able to figure out what is happening in your case.
here is my method from a controller named Groups.php on controllers/zabbix/Groups.php
PHP Code: public function index() as i said, $this->form_validation->run('zabix_groups_search') always return false, but $this->input->post('group_search') is ok and this is my config for the validation PHP Code: 'zabix_groups_search' => array(
I don't understand. That is the config for the validation? You mean that is what the file contains?
Website: http://avenir.ro
Are you using CI 3.0 or 3.0.1? There's a bug fix in 3.0.1 that allows empty rules, but the 3.0 version of the form validation library will always fail on an empty rule.
that bug appear on CI 3.0.1 in my case.
everything work o CI 3.0.0 or CI 3.0-DEV
sorry for disinter that topic, but i've found the problem.
if you submit a form and if you have a form_validation config file with your form entry in it, Like that for example PHP Code: 'zabix_groups_search' => array( the form validation will fail, apparently because no one fields is required. if i add the key "required" to my search (submit button) everythig works fine. maybe an issue ?
Well... I still don't understand why would you make a form validation rule without rules...
Website: http://avenir.ro
yeah, my bad, that was a mistake.
But if I did that, maybe someone else will do the same one day |
Welcome Guest, Not a member yet? Register Sign In |