title: Showing error in CodeIgniter Form Validation Class only if certain condition meet
body: <p>First, i would to apologize for my bad english.</p>
  
  <p>Suppose i have function in controller like this :</p>
  
  <pre><code>function confirm()
      {
          $this-&gt;load-&gt;helper(array('form', 'url'));
          $this-&gt;load-&gt;library('form_validation');
  
          $this-&gt;form_validation-&gt;set_rules('email', 'Email', 'trim|required|valid_email|exist[member.email]');
          $this-&gt;form_validation-&gt;set_rules('secretKey','Secret Key', 'required|callback_secret_check');
  
          $this-&gt;form_validation-&gt;set_message('exist',"Email don't exist");
          $this-&gt;form_validation-&gt;set_message('secret_check','Invalid confirmation code');
  
          if ($this-&gt;form_validation-&gt;run() == FALSE)
            {
              // if error, show form and the error msg
              $this-&gt;view-&gt;full_render('user_confirm') ;
            } else {
              // if all ok
              echo "success" ;
            }
      }
  </code></pre>
  
  <p>In short, this function is used to validate new user email using confirmation code. Just like we found in any site that need registration. I made this function in case some user prefer to submit his confirmation code directly using confirmation form instead of using confirmation url (we send both confirmation url and confirmation code to his email)</p>
  
  <p>Just for your information, the rule "exist" is my own rule created by extending the form class to check if the email submitted is really exist. For the "callback_secret_check" rule, i create callback function (not by extending the form validation class like first rule) to check if the confirmation code submitted by the user is a valid one.</p>
  
  <p>Now, suppose i have user email "example@example.com" with confirmation code "12345". If he submit "example@example.com" with code "22323" then the system will show error message:</p>
  
  <ul>
  <li>invalid confirmation code</li>
  </ul>
  
  <p>No problem with this case.</p>
  
  <p>But, if somebody submit "this.is.not.exist@example.com" with any confirmation code, the system will show error message</p>
  
  <ul>
  <li>Email don't exist</li>
  <li>Invalid confirmation code</li>
  </ul>
  
  <p>what i wanted is only</p>
  
  <ul>
  <li>Email don't exist</li>
  </ul>
  
  <p>without showing "invalid confirmation code" because if the email did not even exist, i think we don't need to tell anything about the confirmation code. Any clue?</p>
  
  <p>thanks for your help.</p>