• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form validation callback in HMVC

#1
[eluser]sanks[/eluser]
I am developing an application using codeigniter HMVC architecture. I am pretty new to HMVC and have just started to explore it. Recently I began to transform my code into HMVC from MVC in codeigniter. I have developed a custom authentication library which resides in my application/libraries folder which has authentication rules for registration and login form. I have written some callback functions in my validations which suddenly stopped working when I opted for HMVC framework. I came across some references to fix this but all in vain. I couldn't somehow make my code working. According to a common suggestion I have built up a MY_Form_validation as below:

Code:
class MY_Form_validation extends CI_Form_validation
{
    public $CI;
}

And then in my authentication library I am using this:
Code:
$this->CI = & get_instance();
                $this->CI->load->library('form_validation');
                $this->CI->form_validation->CI = $this->CI;
and for validation I use this:
Code:
if($this->CI->form_validation->run($this->CI)==FALSE)
But somehow my validation check is not being performed. It used to work on my MVC framework.


Messages In This Thread
Form validation callback in HMVC - by El Forum - 07-19-2012, 05:23 AM
Form validation callback in HMVC - by El Forum - 07-19-2012, 05:46 AM
Form validation callback in HMVC - by El Forum - 07-19-2012, 06:02 AM
Form validation callback in HMVC - by El Forum - 07-19-2012, 02:26 PM
Form validation callback in HMVC - by El Forum - 07-19-2012, 02:40 PM
Form validation callback in HMVC - by El Forum - 07-19-2012, 02:56 PM
Form validation callback in HMVC - by El Forum - 07-19-2012, 03:19 PM
Form validation callback in HMVC - by El Forum - 07-19-2012, 03:37 PM
Form validation callback in HMVC - by El Forum - 07-19-2012, 03:42 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.