Validation callback not called... |
[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
[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')
[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
[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
|
Welcome Guest, Not a member yet? Register Sign In |