title: Codeigniter : Validating two fields
body: <p>I have two numeric fields to collect data from users. Need to validate it using codeigniter form validation class.</p>
  <p>Conditions:</p>
  <ol>
  <li>First field can be zero</li>
  <li>Second field cannot be zero</li>
  <li>First field should not be equal to second field</li>
  <li>Second field should be greater than first field</li>
  </ol>
  <p>Currently I use</p>
  <blockquote>
  <p>$this-&gt;form_validation-&gt;set_rules('first_field', 'First Field',
  'trim|required|is_natural');</p>
  <p>$this-&gt;form_validation-&gt;set_rules('second_field', 'Second Field',
  'trim|required|is_natural_no_zero');</p>
  </blockquote>
  <p>But, how to validate for 3rd and 4th condition mentioned above?</p>
  <p>Thanks in advance.</p>