![]() |
Codeigniter Form Validation not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Codeigniter Form Validation not working (/showthread.php?tid=67580) |
Codeigniter Form Validation not working - nullstrike - 03-12-2017 So I have form with fields and input type file. Why is that form validation still return an error even though the input file is not empty Here's my controller together with my callback function PHP Code: public function add_post() Here's the form mark-up PHP Code: <?php echo form_open_multipart('#',array("class"=>"form-horizontal","id"=>"blogform")); ?> I call the add_post controller function through AJAX. Code: $(document).on('click','#save-post',function(){ I don't understand why validation is not working properly or I think the controller doesn't get the input file. RE: Codeigniter Form Validation not working - php_rocs - 03-28-2017 @nullstrike, Have you resolved this? RE: Codeigniter Form Validation not working - InsiteFX - 03-29-2017 Try change your Ajax url PHP Code: url: "<?php echo site_url('Blog/add_post'); ?>", RE: Codeigniter Form Validation not working - dave friend - 03-29-2017 What does your browswer's web dev tool of choice tell you about the data being posted? |