![]() |
Validation callback not called... - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Validation callback not called... (/showthread.php?tid=36262) |
Validation callback not called... - El Forum - 11-26-2010 [eluser]dynZack[/eluser] For some reason a validation callback is never called. Here's the code: Code: function process_form(){ Code: function notdefault($str){ I'm banging my head against the wall for the last 3+ hours and I'm having thoughts of cutting my dick off. :ahhh: Can anyone spot what might be the problem? Edit: Corrected the name of the callback function Validation callback not called... - El Forum - 11-26-2010 [eluser]kaos78414[/eluser] Change this line: Code: $this->form_validation->set_rules('categoryParent', 'categoryParent', 'required|callback_notdefault') to this Code: $this->form_validation->set_rules('categoryParent', 'categoryParent', 'required|callback__notdefault') Validation callback not called... - El Forum - 11-27-2010 [eluser]dynZack[/eluser] That was my mistake, I was trying other names and forgot to change it back. So unfortunately that's not the problem. Everything looks ok: Callback is in the same controller, can be reached at http://www.exampe.com/controller/notdefault/a_string don't know what else to think Validation callback not called... - El Forum - 11-27-2010 [eluser]dynZack[/eluser] It looks like notdefault method is not found by the Form_validation library Line 581 added die() if callback method not found Code: // Call the function that corresponds to the rule Validation callback not called... - El Forum - 11-27-2010 [eluser]dynZack[/eluser] Spot the problem: HMVC Solution here |