Welcome Guest, Not a member yet? Register   Sign In
multiple callbacks with form_validation?

Is there any way to make this work?

$this->form_validation->set_rules('foo', 'bar', 'trim|required|callback__foo_check|callback__bar_check');

Right now I've implemented it by combining _foo_check() and _bar_check() as one function, but it's a pain and creates more lines of code than feels necessary.

Have you tried it yet? Does it not process multiple callbacks? The user guide is not specific about any limitation on the number of callbacks, and seeing the way it processes the rest of the rules (in addition to ANY single parameter native PHP function) I'm surprised it would not execute multiple callbacks.

yeah, I couldn't get it to work with multiple callbacks.

EDIT: actually now it is. I must be doing something else wrong.

Theme © iAndrew 2016 - Forum software by © MyBB