title: form validation set_message not showing any error in codeigniter
body: <p>I am new to codeigniter. I have created a login page now I want to show an error message that login details are wrong or invalid login, if the user enter wrong credentials. i dont know where i am doing wrong but when i enter wrong credentials the page is refreshed without any error message</p>
  
  <pre><code>function login_user() {
    // Create an instance of the user model
    $this-&gt;load-&gt;model('user_m');
  
    // Grab the email and password from the form POST
    $username= $this-&gt;input-&gt;post('username');
    $pass  = $this-&gt;input-&gt;post('password');
    $this-&gt;form_validation-&gt;set_rules('username', 'Username', 'required|trim');
  
    $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'required|trim');
    $this-&gt;load-&gt;helper('security');
    if($this-&gt;form_validation-&gt;run() == FALSE){
        $this-&gt;load-&gt;view('login');
    }
  
    if( $username &amp;&amp; $pass &amp;&amp; $this-&gt;user_m-&gt;validate_user($username,$pass)) {
        // If the user is valid, redirect to the main view
        redirect('/dashboard');
    } else {
        // Otherwise show the login screen with an error message.
        $this-&gt;form_validation-&gt;set_message('login_user','Wrong email, password combination.');
          $this-&gt;load-&gt;view('login');
    }
  </code></pre>
  
  <p>}</p>
  
  <p>in my view i am using the following line to show errors</p>
  
  <pre><code>&lt;?php echo validation_errors(); ?&gt;
  </code></pre>
  
  <p>the "user name and password field is required" error is working fine but invalid login is not working</p>