title: Callback function in Codeigniter with multiple parameters during form validation
body: <p>In Codeigniter:</p>
  
  <p>Here is the callback function that I am using for validation:</p>
  
  <pre><code>public function has_match($password, $username){
      if (0) {
          // user exists
          return true;
      }
      else {
          $this-&gt;form_validation-&gt;set_message('has_match', 'Invalid Username/password entered ' . $password . ' ' . $username);
          return false;
      }
  }
  </code></pre>
  
  <p>Below are the validation rules:</p>
  
  <pre><code>$this-&gt;form_validation-&gt;set_rules('username', 'Username', 'required');
  $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'required|callback_has_match[username]');
  </code></pre>
  
  <p>Can any one please tell me what I am doing wrong here in calling the callback function, as I am unable to get the value of the username field and it keeps showing 'username' (inside the variable $username in callback) instead?</p>