Multiselect Dropdown validation [Solved- Me Stupid :) ] - 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: Multiselect Dropdown validation [Solved- Me Stupid :) ] (/showthread.php?tid=19010) |
Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]xpix[/eluser] I still can't see the error Here is the view: Code: <? and the controller: Code: }else if($action == 'add'){ ///ADDDDDDDDDD The other 3 fields get validated but the "programs" Maybe I am missing something Thx Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]TheFuzzy0ne[/eluser] Are you saying that you're not getting an error using the demo app I provided? If that works, but your code doesn't then it's clear that something is not right somewhere in your code. Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]xpix[/eluser] Here are the logs Code: DEBUG - 2009-05-24 14:38:52 --> Config Class Initialized no errors Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]xpix[/eluser] [quote author="TheFuzzy0ne" date="1243291698"]Are you saying that you're not getting an error using the demo app I provided? If that works, but your code doesn't then it's clear that something is not right somewhere in your code.[/quote] I get this Parse error: parse error, unexpected $ in /var/www/websites/ccccc/jobs-staging/system/application/controllers/test.php on line 57 Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]xpix[/eluser] [quote author="xpix" date="1243291977"][quote author="TheFuzzy0ne" date="1243291698"]Are you saying that you're not getting an error using the demo app I provided? If that works, but your code doesn't then it's clear that something is not right somewhere in your code.[/quote] I get this Parse error: parse error, unexpected $ in /var/www/websites/ccccc/jobs-staging/system/application/controllers/test.php on line 57[/quote] I got it to work. It was a spacing issue in the multiline assignment. You're code works but I still cannot see the problem in my code. Thx for you help Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]TheFuzzy0ne[/eluser] Code: $this->form_validation->set_rules('programs', 'Programs', 'required|trim|xss_clean'); Should be: Code: $this->form_validation->set_rules('programs[]', 'Programs', 'required|trim|xss_clean'); Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]xpix[/eluser] STUPID STUPID STUPID!!! I forgot to add the error to this line $error_output = form_error('name') . form_error('email') . form_error('pass') . form_error('programs') . $errors; :coolgrin: I changed the line to $error_output = validation_errors() . $errors; This way I catch all the errors. Thx for your help Multiselect Dropdown validation [Solved- Me Stupid :) ] - El Forum - 05-25-2009 [eluser]TheFuzzy0ne[/eluser] You can go one better and do this: Code: $error_output = validation_errors() . $errors; |