title: CodeIgniter form_error returns error message and set_value returns nothing on first page load
body: <p>When using CodeIgniter's Form Validation class, the <code>form_errors</code> in the view always show the error messages. Also, using the <code>set_value</code> method never populates the field with the correct values unless there's no validation against it.</p>
  
  <p>I have extended the form_validation class, but only to add a new method that I needed and removing the code entirely does not make a difference.</p>
  
  <p>The code for my controller is:</p>
  
  <pre><code>function test() {
      $data['title'] = 'My title';
      $this-&gt;form_validation-&gt;set_rules('title', 'Title', 'trim|required');
      if($this-&gt;form_validation-&gt;run() == FALSE) {
          $this-&gt;load-&gt;view('form', $data);
      } else {
          $this-&gt;load-&gt;view('form', $data);
      }
  }
  </code></pre>
  
  <p>The code for my view is:</p>
  
  <pre><code>echo form_open(current_url()).
       form_error('title').
       form_label('Title', 'title').
       form_input(array('name' =&gt; 'title', 'id' =&gt; 'title'), set_value('title', $title)).
       form_label('Other', 'other').
       form_input(array('name' =&gt; 'other', 'id' =&gt; 'other'), set_value('other', 'test')).
       form_submit('submit', 'Update').
       form_close();
  </code></pre>
  
  <p>What I expect is that there are no error messages show, the first input field would have the text 'My title' and the second field would have the text 'other'. If I submitted the forms, then they would show the posted values.</p>
  
  <p>In reality, I always get an error message saying that the first field is required, the first field is always empty when the page loads and the second field is filled correctly with the text 'other'.</p>
  
  <p>If I fill in both/either of the fields and post the form, the fields are returned with the post data, which is correct. I cannot see what I am doing wrong and any help is appreciated.</p>