title: CodeIgniter, show validation errors in corresponding div
body: <p>I have three forms in a page. Say, one for login, one for register and one for forgot password. All these form actions and the same. During the submit, submitted form is identified by a hidden input value.</p>
  
  <pre><code>echo form_hidden('formname', 'registration');
  echo form_hidden('formname', 'login');
  echo form_hidden('formname', 'assistance');
  </code></pre>
  
  <p>Every form have set of validation rules such as <code>valid_email</code>, <code>min_length</code> etc. and errors are thrown if invalid submission. But the problem is, when errors are thrown it is shown all above the three forms. Because every form have <code>validation_errors()</code> above it. And I cannot have single <code>validation_errors</code> in my page.</p>
  
  <p>So is there any way I can place the error messages corresponding to login form in a <code>&lt;div&gt;</code> which ID is <code>login-errors</code> and registration form's errors in <code>&lt;div&gt;</code> which ID is <code>registration-errors</code> etc.?</p>
  
  <pre><code>&lt;div id='registration-errors'&gt;
  &lt;?php
  validation_errors(); // For error messages of registration form
  echo form_open('account', array('method'=&gt;"POST", 'autocomplete'=&gt;"off", 'class'=&gt;'user-register'));
  // Hidden input + Other inputs and labels + Submit button
  ?&gt;
  &lt;/div&gt;
  
  
  &lt;div id='login-errors'&gt;
  &lt;?php
  validation_errors(); // For error messages of registration form
  echo form_open('account', array('method'=&gt;"POST", 'autocomplete'=&gt;"off", 'class'=&gt;'user-login'));
  // Hidden input + Other inputs and labels + Submit button
  ?&gt;
  &lt;/div&gt;
  
  &lt;div id='assistance-errors'&gt;
  &lt;?php
  validation_errors(); // For error messages of forgot password form
  echo form_open('account', array('method'=&gt;"POST", 'autocomplete'=&gt;"off", 'class'=&gt;'user-assistance'));
  // Hidden input + Other inputs and labels + Submit button
  ?&gt;
  &lt;/div&gt;
  </code></pre>