![]() |
Why Isn't My Callback Working? [solved] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Why Isn't My Callback Working? [solved] (/showthread.php?tid=27905) |
Why Isn't My Callback Working? [solved] - El Forum - 02-23-2010 [eluser]kirkaracha[/eluser] I have a callback that isn't working. From the rules array: Code: array( The callback: Code: public function _check_dupe_district(){ I'm expecting it to display an error when I submit a form with a state_id and district_number that area already listed, but it doesn't. (I know they're already being used because I'm looking at the database.) What am I missing? Why Isn't My Callback Working? [solved] - El Forum - 02-23-2010 [eluser]kierownik[/eluser] I think it should be $this->form_validation->set_message and not $this->set_message Why Isn't My Callback Working? [solved] - El Forum - 02-23-2010 [eluser]kirkaracha[/eluser] Yeah, I fixed that and it still doesn't work. Why Isn't My Callback Working? [solved] - El Forum - 02-23-2010 [eluser]kirkaracha[/eluser] This works, but I'm not sure why the get_where way didn't. Controller: Code: public function _check_dupe_district(){ Model: Code: public function check_duplicate_district($state_id,$district_number){ |