![]() |
problem with form_validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: problem with form_validation (/showthread.php?tid=62914) |
problem with form_validation - keulu - 09-07-2015 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 ? RE: problem with form_validation - mwhitney - 09-08-2015 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. RE: problem with form_validation - keulu - 09-09-2015 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( RE: problem with form_validation - Avenirer - 09-09-2015 I don't understand. That is the config for the validation? You mean that is what the file contains? RE: problem with form_validation - keulu - 09-09-2015 no that's just a part of my array RE: problem with form_validation - mwhitney - 09-09-2015 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. RE: problem with form_validation - keulu - 09-10-2015 that bug appear on CI 3.0.1 in my case. everything work o CI 3.0.0 or CI 3.0-DEV RE: problem with form_validation - keulu - 01-15-2016 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 ? RE: problem with form_validation - Avenirer - 01-15-2016 Well... I still don't understand why would you make a form validation rule without rules... RE: problem with form_validation - keulu - 01-15-2016 yeah, my bad, that was a mistake. But if I did that, maybe someone else will do the same one day ![]() |