1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect2 id="zend.validate.set.lessthan">
4 <title>LessThan</title>
7 <classname>Zend_Validate_LessThan</classname> allows you to validate if a given value is
8 less than a maximum border value. It is the cousine of
9 <classname>Zend_Validate_GreaterThan</classname>.
13 <title>Zend_Validate_LessThan supports only number validation</title>
16 It should be noted that <classname>Zend_Validate_LessThan</classname> supports only the
17 validation of numbers. Strings or dates can not be validated with this validator.
21 <sect3 id="zend.validate.set.lessthan.options">
22 <title>Supported options for Zend_Validate_LessThan</title>
25 The following options are supported for <classname>Zend_Validate_LessThan</classname>:
31 <emphasis><property>max</property></emphasis>: Sets the maximum allowed value.
37 <sect3 id="zend.validate.set.lessthan.basic">
38 <title>Basic usage</title>
41 To validate if a given value is less than a defined border simply use the following
45 <programlisting language="php"><![CDATA[
46 $valid = new Zend_Validate_LessThan(array('max' => 10));
48 $return = $valid->isValid($value);
53 The above example returns <constant>TRUE</constant> for all values which are equal to 10