![]() |
After a form validation.. - 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: After a form validation.. (/showthread.php?tid=13072) |
After a form validation.. - El Forum - 11-10-2008 [eluser]julgus[/eluser] I have a form validation which works great. After the validation I need to check entered data usinga a database search. If the searchs fails, the forms is not valid and need to be reentered/edited. Can I : - Use the form validation passing a function as an argument to be a part of the form valdiation? - Or can I manually add data to the validation_errors() function which will show the error encountered in the database search? Regards Johan, Sweden After a form validation.. - El Forum - 11-10-2008 [eluser]OES[/eluser] All you need to do is use a custom callback. See the form_validation user guide. (http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#callbacks) It will do what you want. Good Luck After a form validation.. - El Forum - 11-10-2008 [eluser]julgus[/eluser] Thanks - I just located it in the manual... Regards Johan |