title: How to validate in Zend Framework if a float/double is equal or greater/less than a min?
body: <p>I've a simple question for which I've not found an answer and that is</p>
  
  <p>How can I use the built-in Zend Validator to test if a <strong>float/dobule</strong> is Greater than or Equal of a min?</p>
  
  <p>I've already searched for an answer that fits my request and I discovered this question <a href="https://stackoverflow.com/questions/5730075/greaterorequal-validator-in-zend-framework">GreaterOrEqual validator in Zend Framework</a> but mine is a little bit different. Besides, I know that I can create my own Validator or copy one of those that are on the web like this one <a href="http://www.nickpack.com/article/zend-framework-greaterthan-equalto-validator" rel="nofollow noreferrer">Greater Than or Equal Validator</a> but I would like to know how I can do this validation with the built-in validators.</p>
  
  <p>This is an example to let you better understand.</p>
  
  <p>If I had an integer, I can achieve this goal in this way:</p>
  
  <pre><code>$Validators = array(new Zend_Validate_Int(), new Zend_Validate_GreaterThan($min - 1));
  // Validate the number
  </code></pre>
  
  <p>Instead, If I had a float, I can't do this trick and, as a lot of programmers know, trying to do dirty things with float can create a lot of issue because of the rounding problem (<a href="http://download.oracle.com/docs/cd/E19957-01/806-3568/ncg_goldberg.html" rel="nofollow noreferrer">What Every Computer Scientist Should Know About Floating-Point Arithmetic</a>).</p>
  
  <p>Thanks to all</p>