validation problem - 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: validation problem (/showthread.php?tid=21387) |
validation problem - El Forum - 08-08-2009 [eluser]alberta[/eluser] hi, I am using form validation, but error message is not displayed this is the code view file Code: <table class="{class}"> controller file Code: function edit_plan($plan_id) validation problem - El Forum - 08-08-2009 [eluser]Clooner[/eluser] You don't assign a name to the form input. e.g. Code: <input type="text" name="my_commit"> It is also better use the correct form_validation library instead of the old validation library which is deprecated validation problem - El Forum - 08-09-2009 [eluser]alberta[/eluser] sorry, i had put wrong view page.. Code: {states} i've also used form_validation, but still not showing error message validation problem - El Forum - 08-09-2009 [eluser]Clooner[/eluser] [quote author="alberta" date="1249821157"]sorry, i had put wrong view page.. i've also used form_validation, but still not showing error message [/quote] It seems that you mess up the order somehow. It should look like something like this In your controller Code: function edit_plan($plan_id) Code: <?php echo form_error('commit'); ?> again use the form_validation library. It is a bad idea to use the validation library. Make sure you do everything in the correct order. The manual is very clear on how to use the form_validation library. validation problem - El Forum - 08-14-2009 [eluser]alberta[/eluser] thanks, this code works fine for text fields. but again creating problem for checkboxe. I have written the code in correct format but for checkbox no use. Neither it dispays error message nor goes to succes page even if checkbox is selected. validation problem - El Forum - 08-14-2009 [eluser]Clooner[/eluser] [quote author="alberta" date="1250260544"]thanks, this code works fine for text fields. but again creating problem for checkboxe. I have written the code in correct format but for checkbox no use. Neither it dispays error message nor goes to succes page even if checkbox is selected.[/quote] Please read the manual. It clearly says : Code: <input type="checkbox" name="mycheck[]" value="1" <?php echo set_checkbox('mycheck[]', '1'); ?> /> |