title: Codeigniter form validation config file not working
body: <p>I'm using the technique of saving codeigniter form validation rules to a config file as specified <a href="http://codeigniter.com/user_guide/libraries/form_validation.html#savingtoconfig" rel="nofollow noreferrer">here</a>, but can't seem to get it working.</p>
  
  <p>I am also attempting to invoke validation callback functions from a Validation_Callbacks.php library which I'm autoloading via the autoload.php mechanism.</p>
  
  <p>Below is a snippet from my form_validation.php form validation rules config file:</p>
  
  <pre><code>&lt;?php
  /* This config file contains the form validation sets used by the application */
  
  $config = array(
      'register_user' =&gt; array(
              array(
                      'field' =&gt; 'dob',
                      'label' =&gt; 'lang:register_dob',
                      'rules' =&gt; 'trim|required|date_check|age_check|xss_clean'
                  ), ...
              )
            )
  </code></pre>
  
  <p>And here is the Validation_Callbacks.php file, that lives under application/libraries:</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
  /**
  * Custom validator library containing app-specific validation functions
  */
  class Validation_Callbacks {
  /* Checks that the given date string is formatted as expected */
  function date_check($date) {
      $ddmmyyyy='(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.](19|20)[0-9]{2}';
      if(preg_match("/$ddmmyyyy$/", $date)) {
          return TRUE;
      } else {
          $this-&gt;form_validation-&gt;set_message('date_check', $this-&gt;lang-&gt;line('error_register_dob_format'));
          return FALSE;
      }
  }
  
  /* Checks that the given birthday belongs to someone older than 18 years old. We assume
  * that the date_check method has already been run, and that the given date is in the
  * expected format of dd/mm/yyyy */
  function age_check($date) {
      $piecesDate = explode('/', $date);
      $piecesNow = array(date("d"), date("m"), date("Y"));
      $jdDate = gregoriantojd($piecesDate[1], $piecesDate[0], $piecesDate[2]);
      $jdNow = gregoriantojd($piecesNow[1], $piecesNow[0], $piecesNow[2]);
  
      $dayDiff = $jdNow - $jdDate;
  
      if ($dayDiff &gt;= 6570) {
          return TRUE;
      } else {
          $this-&gt;form_validation-&gt;set_message('age_check', $this-&gt;lang-&gt;line('error_register_age_check'));
          return FALSE;
      }
  }
  
  }
  </code></pre>
  
  <p>I'm invoking this using the standard:</p>
  
  <pre><code>if ($this-&gt;form_validation-&gt;run('register_user') == FALSE) {
  </code></pre>
  
  <p>My callback functions are not being called. Is there something I'm missing here? Thanks in advance for any help you may be able to provide!</p>