php - callback not working in codeigniter 3.0 -


<?php  class form extends ci_controller {      public function index()     {         $this->load->helper(array('form', 'url'));          $this->load->library('form_validation');          $this->form_validation->set_rules('email', 'email', 'required|valid_email');         $this->form_validation->set_rules('password', 'password', 'required');         $this->form_validation->set_rules('confpassword', 'password', 'required|matches[password]', 'callback__matcherror');            //$this->form_validation->set_rules('passconf', 'password confirmation', 'required');         //$this->form_validation->set_rules('email', 'email', 'required');          if ($this->form_validation->run() == false)         {             $this->load->view('login');          }         else         {              $this->load->view('insert_dream');          }      }  public function _matcherror() {     $this->form_validation->set_message('_matcherror', 'passwords should match');     return false; }  } ?> 

i newbie codeigniter. above code doesnt display passwords should match error message. wrong callback or missing something.

take here. don't need make callback.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -