title: Change input element class on form_error?
body: <p>So, i would like to change the style on a input element when i get a form_error on that element.</p>
  
  <p>In my controller, i have all the form_validation rules, and every inputelement attributes</p>
  
  <pre><code>        if ($this-&gt;form_validation-&gt;run() == FALSE)
      {
          $data['username'] = array(
              'name' =&gt; 'username',
              'id' =&gt; 'username'
              );
  
          $data['password'] = array(
              'type' =&gt; 'password',
              'name' =&gt; 'password',
              'id' =&gt; 'password'
              );
      }
  </code></pre>
  
  <p>And in my View, i am printing them out.</p>
  
  <pre><code>            &lt;li&gt;
                  &lt;label for="username" class="bold"&gt;Username&lt;/label&gt;
                  &lt;span class="input-prepend"&gt;$&lt;/span&gt;
                  &lt;?php echo form_input($username); ?&gt;
              &lt;/li&gt;
  </code></pre>
  
  <p>So, i need the easiset way to change the class on the corrisponding element that gets a form error. Is it any easy way to do this? </p>
  
  <p>Please, let me know if i'm explaining bad :)
  Thank you.</p>