title: Codeigniter Form Validation based on the optional value using config file
body: <p>I am  Doing a CodeIgniter form validation using a form_validation file created in the config folder </p>
  
  <p>ex:</p>
  
  <pre><code>$config = array(
      'signupBasic' =&gt; array(
          array(
              'field' =&gt; 'title',
              'label' =&gt; 'Title',
              'rules' =&gt; 'required'
          ),
          array(
              'field' =&gt; 'firstName',
              'label' =&gt; 'First Name',
              'rules' =&gt; 'required'
          ),
           array(
              'field' =&gt; 'companyName',
              'label' =&gt; 'Company Name',
              'rules' =&gt; 'required'
          ),
          array(
              'field' =&gt; 'addMoreOfficer',
              'label' =&gt; 'Add More Officers',
              'rules' =&gt; 'callback_addmore_check'
          ),
      )
  );
  </code></pre>
  
  <p>The Problem is I Have some fields which are to be validated only if the checkbox is checked how can i achieve this using the $config array method</p>