[MANUAL] English:
[zend.git] / documentation / manual / en / module_specs / Zend_Validate-GreaterThan.xml
blob5847dda5beec4be803ee5777725f90609416a505
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect2 id="zend.validate.set.greaterthan">
4     <title>GreaterThan</title>
6     <para>
7         <classname>Zend_Validate_GreaterThan</classname> allows you to validate if a given value is
8         greater than a minimum border value.
9     </para>
11     <note>
12         <title>Zend_Validate_GreaterThan supports only number validation</title>
14         <para>
15             It should be noted that <classname>Zend_Validate_GreaterThan</classname> supports only
16             the validation of numbers. Strings or dates can not be validated with this validator.
17         </para>
18     </note>
20     <sect3 id="zend.validate.set.greaterthan.options">
21         <title>Supported options for Zend_Validate_GreaterThan</title>
23         <para>
24             The following options are supported for
25             <classname>Zend_Validate_GreaterThan</classname>:
26         </para>
28         <itemizedlist>
29             <listitem>
30                 <para>
31                     <emphasis><property>min</property></emphasis>: Sets the minimum allowed value.
32                 </para>
33             </listitem>
34         </itemizedlist>
35     </sect3>
37     <sect3 id="zend.validate.set.greaterthan.basic">
38         <title>Basic usage</title>
40         <para>
41             To validate if a given value is greater than a defined border simply use the following
42             example.
43         </para>
45         <programlisting language="php"><![CDATA[
46 $valid  = new Zend_Validate_GreaterThan(array('min' => 10));
47 $value  = 10;
48 $return = $valid->isValid($value);
49 // returns true
50 ]]></programlisting>
52         <para>
53             The above example returns <constant>TRUE</constant> for all values which are equal to 10
54             or greater than 10.
55         </para>
56     </sect3>
57 </sect2>
58 <!--
59 vim:se ts=4 sw=4 et:
60 -->