title: Codeigniter Form Validation always returns false
body: <p>I've spent so much time on this one I think I've gone code-blind. The form validation is always returning FALSE on run and I can't figure out the reason.</p>
  
  <p>The new_map() function displays first the form, on submit of the form (with value set in the map_name field of course), the form validation run returns false and the form is reset with no errors displayed however. What am I missing??</p>
  
  <p>Controller:</p>
  
  <pre><code>public function new_map()
  {
      $data['extra_assets']['js'][] = 'app/admin/maps.js';
  
      $data['title'] = 'Add Map';
  
      $this-&gt;form_validation-&gt;set_rules('map_name', 'Map name', 'required');
  
      if ($this-&gt;form_validation-&gt;run() == FALSE)
      {  
          $this-&gt;load_admin_view('admin/ae_map', $data);
      }
      else
      {
          $this-&gt;load-&gt;model('maps_model');
          echo 'inside true';exit;
          // Upload map
          if ($this-&gt;maps_model-&gt;upload_map())
          {
              redirect(site_url('admin/maps'));
          }
      }
  }
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>public function upload_map()
  {
      $config['upload_path'] = root_path() . 'space/maps/';
      $config['allowed_types'] = 'gif|jpg|png';
      $this-&gt;load-&gt;library('upload', $config);
  
      $map_name = $this-&gt;input-&gt;post('map_name');
  
      if ( ! $this-&gt;upload-&gt;do_upload('map_file'))
      {
          $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
  
          echo $this-&gt;upload-&gt;display_errors();exit;
          return FALSE;
      }
      else
      {
          $data = array('upload_data' =&gt; $this-&gt;upload-&gt;data());
  
          // Insert map into database
          $options = array(
                      'm_file' =&gt; $data['upload_data']['file_name'],
                      'm_name' =&gt; $map_name
                   );
          $this-&gt;insert_map($options);
  
          // Create a thumbnail of this map
          $this-&gt;generate_map_thumb($data['upload_data']['file_name']);
      }
  
      return TRUE;
  }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;div class="modalContent" style="width: 300px; height: 250px;"&gt;
  &lt;h1&gt;&lt;?php echo $title; ?&gt;&lt;/h1&gt;
  
  &lt;?php echo validation_errors(); ?&gt;
  
  &lt;div id="MAP_FORM" class="formListing"&gt;
      &lt;?php echo form_open_multipart('admin/new_map'); ?&gt;
  
      &lt;ul&gt;
          &lt;li&gt;        
              &lt;div&gt;&lt;label&gt;File: &lt;/label&gt;&lt;/div&gt;
              &lt;div&gt;&lt;span&gt;&lt;input type="file" id="MAP_FILE" name="map_file" /&gt;&lt;/span&gt;&lt;/div&gt;
          &lt;/li&gt;
          &lt;li&gt;      
              &lt;div&gt;&lt;label&gt;Name: &lt;/label&gt;&lt;/div&gt;
              &lt;div&gt;&lt;span&gt;&lt;input type="text" id="MAP_NAME" name="map_name" value="" /&gt;&lt;/span&gt;&lt;/div&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  
      &lt;br /&gt;
      &lt;input type="submit" value="Submit" id="SUBMIT_MAP" name="submit_map" /&gt;
  
      &lt;?php echo form_close(); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>