[SOLVED!] HMVC + CI20 + Callback problem! |
[eluser]eokorie[/eluser]
Anyone managed to get form validation callbacks in CodeIgniter 2.0 working with HMVC? I am aware that there were are some topics on the very same subject but not sure if they will work for CI2.0? Anyway encounter this? All have to mention that I tried the solutions and callbacks are still not working... Update: Sorted my problem out..
[eluser]jkevinburton[/eluser]
I am having the problem now... How did you sort it out?
[eluser]jkevinburton[/eluser]
Here is the solution... Code: $this->load->library('form_validation');
[eluser]danmontgomery[/eluser]
You can also use: Code: $this->load->library('form_validation');
[eluser]wiredesignz[/eluser]
Code: <?php @Sven, It might help to read the WIKI before posting... https://bitbucket.org/wiredesignz/codeig.../wiki/Home
[eluser]Sven Delle[/eluser]
Totally agree! And I did. I just simply made the mistake of separating the piped elements into individual parameters as in: Code: $this->form_validation->set_rules('username', 'Username', 'required', 'callback_check_default_username'); Instead of: Code: $this->form_validation->set_rules('username', 'Username', 'required|callback_check_default_username'); So what I ended up doing, was trying ALL SORTS of different solutions, instead of just replacing 3 characters with one. Don't know if this sound familiar to others. So more attention to detail is a good thing : ). And by the way; I do not extend MX_Controller but CI_Controller, so I guess this is not necessary? |
Welcome Guest, Not a member yet? Register Sign In |