validation dunamically created fields - 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 dunamically created fields (/showthread.php?tid=11631) |
validation dunamically created fields - El Forum - 09-17-2008 [eluser]dimis[/eluser] I have this function for validation of a form Code: function myvalidproduct() But the code Code: foreach ($lancode as $lan) HOw can I fix it and validtaete thiw inputs validation dunamically created fields - El Forum - 09-17-2008 [eluser]Weblizard[/eluser] Remove Code: $lancode=array(); validation dunamically created fields - El Forum - 09-17-2008 [eluser]dimis[/eluser] I have this code Code: function add() Code: function myvalidproduct($lancode) Code: function returnonlycode() validation dunamically created fields - El Forum - 09-17-2008 [eluser]dimis[/eluser] I thing I solve it. Dimis validation dunamically created fields - El Forum - 09-17-2008 [eluser]xwero[/eluser] You are making it to complex i think Code: $lancode=$this->lans->returnonlycode($lancode); Code: function returnonlycode() Code: function returnonlycode() Why are you putting the rules in another function? For the rules not being added you could check if with print_r($rules) to check if the rules are added. If you keep the function you can check with print_r($this->validation->_rules) if the rules in your function are attached to the validation class and are the ones that are going to be checked. validation dunamically created fields - El Forum - 09-17-2008 [eluser]dimis[/eluser] Quote:Why are you putting the rules in another function?I do it just for some separation of code, now is works. How can I make a loop with the error messages? Thank you Dimis |