Callbacks and array ? - 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: Callbacks and array ? (/showthread.php?tid=45725) |
Callbacks and array ? - El Forum - 10-03-2011 [eluser]quasiperfect[/eluser] i use the latest https://github.com/EllisLab/CodeIgniter i have in the controller Code: $this->load->library('form_validation'); $this->form_validation->set_rules('myarray[]', 'myarray', 'callback__myarray_check'); Code: function _myarray_check($str) { in the view Code: <form method="post" action="welcome/"> on submit i get 1|2| so the callback is called for each value of the array is this intended ? is a bug ? to me more logical would be to get the array as parameter and to execute the callback once edit if nothing is selected the callback is not even called |