title: float Number validation check for codeigniter
body: <p>Here I am entering tax field in % but when i enter values like 2.5,0.5 other than integer it is generating error.
  Here is my code for Validation,any idea for entering float numbers
  <code></p>
  <pre>function _set_rules()
  {
    $this-&gt;form_validation-&gt;set_rules('pst','PST','trim|required|is_natural|numeric|
     max_length[4]|callback_max_pst');
    $this-&gt;form_validation-&gt;set_rules('gst','GST','trim|required|is_natural|numeric|
  max_length[4]|callback_max_gst');
  }
  function max_pst()
   {
     if($this-&gt;input-&gt;post('pst')&gt;100)
      {
        $this-&gt;form_validation-&gt;set_message('max_pst',' %s Value Should be less than or equals to 100');
  return FALSE;
      }
     return TRUE;
    }
  function max_gst()
    {
      if($this-&gt;input-&gt;post('gst')&gt;100)
        {
      $this-&gt;form_validation-&gt;set_message('max_gst',' %s Value Should be less than or equals to 100');
      return FALSE;
      }
     return TRUE;
    }
  &lt;/code&gt;
  </code></pre>