![]() |
Form Validation: return calues for rules? - 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: Form Validation: return calues for rules? (/showthread.php?tid=43254) |
Form Validation: return calues for rules? - El Forum - 07-05-2011 [eluser]mindph[/eluser] Hi Is it possible somehow, to have the form validator return which rule was failing validation? The purpose why I could need this is simply: I dont want to display only the errors, but also hilight the field what failed validation. So that I could get something like Code: if($this->form_validation->rule('firstName') == FALSE){ Form Validation: return calues for rules? - El Forum - 07-05-2011 [eluser]misplacedme[/eluser] Check out the section labeled "Showing Errors Individually" in the form validation page. Code: <h5>Username</h5> Form Validation: return calues for rules? - El Forum - 07-05-2011 [eluser]mindph[/eluser] Okay thanks that looks cool. Gonna like CI! Form Validation: return calues for rules? - El Forum - 07-06-2011 [eluser]mindph[/eluser] BTW The userguide tells me only about these values to set in an array. Code: $data = array( Code: 'class' => 'classname' |