I am a new to codeIgniter and I just got stuck in the very beginning. I am using HMVC extention and while validating I am getting the following error:
Unable
For future searches. There are two 3 things you need to check when this error shows.
Check the name of the callback function if it is the same with the
$this->form_validation->set_rules('pword', 'Password', 'required|max_length[30]|callback_pword_check
public function pword_check($str){
if ($str == 'test'){
$this->form_validation->set_message('pword_check', 'The %s field can not be the word "test"');
return FALSE;
}
else{
return TRUE;
}
}
*public function pword_check($str){
*set_message('pword_check', 'The %s field...
In codeigniter 2.X you can do this
$this->form_validation->run($this) == TRUE
In 3.x it should be like this
$this->form_validation->run() == TRUE
and you need to add this two line of codes on __construct()
function __construct(){
parent::__construct();
$this->load->library('form_validation');
$this->form_validation->CI =& $this;
}
Add this file on your application/libraries/MY_Form_validation.php
Cheers! See https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/src/f77a3fc9a6fd?at=codeigniter-3.x
https://www.youtube.com/watch?v=pp4Y_bIhASY&list=PLBEpR3pmwCayNcTCUWlUToK4qIQfFQCCm&index=8
For reference.