Please Help with Form Validation Hmvc - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Please Help with Form Validation Hmvc (/showthread.php?tid=63036) |
Please Help with Form Validation Hmvc - Vimal - 09-18-2015 I am Using HMVC with Codeigniter 3. I am trying to make custom validation callback function and its not working with HMVC. I get solution from searching in google like. PHP Code: class MY_Form_validation extends CI_Form_validation { But its not working for me. Help me RE: Please Help with Form Validation Hmvc - Vimal - 09-21-2015 Any One? RE: Please Help with Form Validation Hmvc - PaulD - 09-21-2015 I presume you are using WireDesigz HMVC. Assuming this, callbacks are an issue with it but easily soluble. In the docs for HMVC it says that you need to : Quote:When using form validation with MX you will need to extend the CI_Form_validation class as shown below, You can read about it here in full: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc There are also lots of good examples to solve this: http://stackoverflow.com/questions/27923836/codeigniter-hmvc-callback-not-working I hope this helps, Best wishes, Paul. RE: Please Help with Form Validation Hmvc - wolfgang1983 - 10-08-2015 Make sure that this code below is in application/libraries/MY_Form_validation.php PHP Code: <?php Second when using callbacks with HMVC must include $this variable as shown below. PHP Code: public function index() { |