Conditioning the requirments validation on whether another condition was met - 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: Conditioning the requirments validation on whether another condition was met (/showthread.php?tid=59342) |
Conditioning the requirments validation on whether another condition was met - El Forum - 09-23-2013 [eluser]Unknown[/eluser] I inherited my first CI project from another developer. I need to modify the validation of 2 different forms based on if another field was selected (checkboxes, in one case) and if a form field has information in it (another case). For the first case, if a check box is selected (from the group funding_programs[]), then a group of validation rules must be set, if not, then they are not required. Here is my code snippet in the __validation_rules(): Code: //If 'precollege' is selected Doe the validation load on submit and has access to the $_POST or $_GET? Conditioning the requirments validation on whether another condition was met - El Forum - 09-23-2013 [eluser]CroNiX[/eluser] Code: if ($this->input->post('some_field') == 'some_val') |