title: validation max_length, min_length in codeigniter
body: <p>I am getting an error when trying to set custom validation messages in <code>CodeIgniter</code> for the <code>min_length</code> and <code>max_length</code> validation constraints.</p>
  
  <p>These are my validation rules:</p>
  
  <pre><code>$this-&gt;form_validation-&gt;set_rules('username', 'Username', 'required|xss_clean|min_length[6]|max_length[10]');
  $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'required|min_length[8]|max_length[20]';
  </code></pre>
  
  <p>These are my custom validation message:</p>
  
  <pre><code>$this-&gt;form_validation-&gt;set_message('min_length[3]', '%s: the minimum of characters is three');
  $this-&gt;form_validation-&gt;set_message('max_length[20]', '%s:the maximum of characters is 20');
  </code></pre>
  
  <p>In my example we have two fields, but I have many fields with different minimum and maximum length values. They all have a specific constraint validations. This messages doesn't work. The message appears by default.  Thanks for your help.</p>