![]() |
accessing field names that have errors? - 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: accessing field names that have errors? (/showthread.php?tid=31162) |
accessing field names that have errors? - El Forum - 06-08-2010 [eluser]dottedquad[/eluser] Hello all, I'm attempting to port my working form validation to the codeigniter form validation way. So far I have: Code: <?php My original validation script looped through the form fields and if an error was found set the field name and custom error message to an array (IE: $validate_field = array("birth_date", "Required!") ![]() Now, I'm attempting to port my old script over to codeigniter and have no idea how to do this. So far I stored the $_get['']; variables to their own variables. I'm only validating the $birthdate variable for demo purposes until I get the hang of this. Now I'm trying to figure out how to pass the input field name along with an error msg in JSON form (IE: ["birth_date", "Required"] so the client side can tooltip the error messages by the input field. Any ideas? -Thanks, Rich accessing field names that have errors? - El Forum - 06-08-2010 [eluser]dottedquad[/eluser] I read a little further and I could just create a validation function. That should work. -rich |