title: Form validation and form action not working in codeigniter 3
body: <p>I am building my first codeigniter application and trying to figure out how to implement basic authentication feature. Following is my login view:</p>
  
  <pre><code>&lt;div&gt;&lt;?php echo validation_errors(); ?&gt;&lt;/div&gt;
  &lt;?php echo form_open('admin/index', ['role' =&gt; 'form']); ?&gt;
            &lt;fieldset&gt;
              &lt;legend&gt;&lt;i class="fa fa-lock"&gt;&lt;/i&gt; Secure Sign-In&lt;/legend&gt;
              &lt;div class="form-group"&gt;
                &lt;label for="username"&gt;Username&lt;/label&gt;
                &lt;?php echo form_input(['name' =&gt; 'username', 'id' =&gt; 'username', 'class' =&gt; 'form-control', 'value' =&gt; '']); ?&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                &lt;label for="password"&gt;Password&lt;/label&gt;
                &lt;?php echo form_password(['name' =&gt; 'password', 'id' =&gt; 'password', 'class' =&gt; 'form-control']) ?&gt;
                &lt;div class="checkbox"&gt;
                  &lt;label&gt;
                    &lt;?php echo form_checkbox(['name' =&gt; 'remember_me', 'value' =&gt; 'Remember Me']) ?&gt; Remember Me
                  &lt;/label&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;button type="submit" class="btn btn-primary"&gt;
                &lt;i class="fa fa-sign-in"&gt;&lt;/i&gt; Sign In
              &lt;/button&gt;
              &lt;a class="btn btn-link" href=""&gt;Forgot Your Password?&lt;/a&gt;
            &lt;/fieldset&gt;
          &lt;?php echo form_close(); ?&gt;
  </code></pre>
  
  <p>Admin controller goes like following:</p>
  
  <pre><code>defined('BASEPATH') OR exit('No direct script access allowed');
  
  class Admin extends CI_Controller {
  
      public function __construct() 
      {
          parent::__construct();
      }
  
      public function index()
      {
          $this-&gt;load-&gt;view('templates/header');
          $this-&gt;load-&gt;view('auth/login_view');
          $this-&gt;load-&gt;view('templates/footer');
          $this-&gt;load-&gt;helper('url','form');
          $this-&gt;load-&gt;library('form_validation');
          $this-&gt;form_validation-&gt;set_rules('username', 'UserName', 'required');
          $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'required|min_length[4]');
      }
  }
  </code></pre>
  
  <p>When i submit the empty form (no input in user name and password input field), it should ideally perform the validation and display error on login view but it's not. It shows nothing.</p>
  
  <p>Also, When i opened the login view page source in chrome I noticed that the form action value looks a little different. It has following value:</p>
  
  <pre><code>&lt;form action="http://[::1]/meshi/index.php/admin/index" role="form" method="post" accept-charset="utf-8"&gt;
  </code></pre>
  
  <p>I am not sure what [::1] means in form action. Also, I have not specified base url value in the config file.</p>