Change Password IN MVC not working : I have CI application which has change password functionality but somehow its returning nothing. Below is code whic I have written in MVC fomrat
**Controller**

    <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
    class Password extends CI_Controller {
    	
    	public function __construct()
    	{
    		parent::__construct();
    		//$this->load->model('person_model','person');
    		$this->load->model('password_model');
    		//$this->load->model('invoice_model','invoice');
    	}
    	
    	public function index()
    	{	
    		$this->load->helper('url');	
    		$this->load->view('manpass');
    	}
    	
    	public function edit_password()
    {
        $uderid = $this->session->userdata('user_id');
        // update data
    
        if($_POST)
        {
            if($this->input->post('old_password')!=''){
                $this->form_validation->set_rules('old_password','Old password',  'trim|required|xss_clean|addslashes|encode_php_tags |callback_oldpass_check');            
                $this->form_validation->set_rules('new_password','New password', 'trim|required|xss_clean|addslashes|encode_php_tags|min_length['.PASS_MIN_LEN.']|md5');
                $this->form_validation->set_rules('conf_password', 'Confirm password', 'trim|required|xss_clean|addslashes|encode_php_tags|min_length['.PASS_MIN_LEN.']|matches[new_password]|md5');
    
                if($this->form_validation->run() == TRUE) 
                {       
                    $data =array( 'password' => $this->input->post('conf_password'));                   
                    $this->main->update('user','user_id',$uderid,$data);
    
                    $this->change_password('Password updated successfully');                      
                }
                else{
                    $this->change_password();
                    }       
                }
    
            else{
                redirect(base_url().'user' , '301');
            }
        }       
    	var_dump();
    }
    
     function oldpass_check($oldpass)
     {  
        $user_id = $this->session->userdata('user_id');
        $result = $this->main->check_oldpassword($oldpass,$user_id);       
            if($result ==0)
                {
                    $this->form_validation->set_message('oldpass_check', "%s doesn't match.");
                    return FALSE ;  
    
                }
             else
                {
                    return TRUE ;
    
                }             
    }
    }

**Model**

    <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
    class Password_model extends CI_Model {
    	
    public function check_oldpassword($oldpass,$user_id)
    {
        $this->db->where('user_id', $user_id);
        $this->db->where('password', md5($oldpass));        
        $query = $this->db->get('user'); //data table
        return $query->num_rows(); 
    }
    
    
    }

**View**
 

    <div class="content-wrapper">
        			<div class="container-fluid">
        			  <!-- Breadcrumbs-->
        			  <ol class="breadcrumb">
        				<li class="breadcrumb-item">
        				  <a href="#">Home</a>
        				</li>
        				<li class="breadcrumb-item active">Password Management</li>
        			  </ol>
        			  <!-- Change Password-->
        			 <div class="row">
        				<div class="col-lg-6">
        					<form role="form" name="form1" id="form1" action="" method="post">
        						<div class="form-group">
        							<label>Old Password</label>
        							<input type="text" name="old_password" id="old_password"  class="form-control">
        						</div>
        						 <div class="form-group">
        							<label>New Password</label>
        							<input type="text" name="new_password" id="new_password" class="form-control">
        						</div>
        						 <div class="form-group">
        							<label>Confirm Password</label>
        							<input type="text" name="conf_password" id="conf_password" class="form-control">
        						</div>
        						<button type="submit" name="submit" class="btn btn-primary">Change Password</button>
        						<button type="reset" name="cancel" class="btn btn-danger">Cancel</button>
        					</form>
        				</div>
        			 </div>
        			</div>
        			<!-- /.container-fluid-->
        			<!-- /.content-wrapper-->
        		   </div>
        		</div>

    		
I am not sure where I am missing the link and where the data flow is missing. Please help. The loader is loading the correct form but its nopt displaying any error message whcih i have included in controller
