CodeIgniter Forums
[Solved] Many callbacks on one field - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: [Solved] Many callbacks on one field (/thread-21569.html)



[Solved] Many callbacks on one field - El Forum - 08-13-2009

[eluser]fdog[/eluser]
Hello,

I have this code in my controller:

Code:
$this->form_validation->set_rules('date1', 'Date 1','trim|callback_date_check|callback_test');

The first callback always returns TRUE.

This is my test function (second callback):

Code:
function test(){
    $this->form_validation->set_message('test', 'Msg');
    return FALSE;    
}

The thing is that it works correctly when I place it on other "set of rules" that doesn't have a callback already. It seems that the library only support one callback for each field.

What's wrong? Should I extend the the form validation library?

Thank you.


[Solved] Many callbacks on one field - El Forum - 08-13-2009

[eluser]Colin Williams[/eluser]
I think this is fixed in SVN...


[Solved] Many callbacks on one field - El Forum - 08-14-2009

[eluser]fdog[/eluser]
Yes it is. Thank you.