Zend_Validate-LessThan.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <!-- EN-Revision: 21263 -->
  4. <sect2 id="zend.validate.set.lessthan">
  5. <title>LessThan</title>
  6. <!-- TODO : to be translated -->
  7. <para>
  8. <classname>Zend_Validate_LessThan</classname> allows you to validate if a given value is
  9. less than a maximum border value. It is the cousine of
  10. <classname>Zend_Validate_GreaterThan</classname>.
  11. </para>
  12. <note>
  13. <title>Zend_Validate_LessThan supports only number validation</title>
  14. <para>
  15. It should be noted that <classname>Zend_Validate_LessThan</classname> supports only the
  16. validation of numbers. Strings or dates can not be validated with this validator.
  17. </para>
  18. </note>
  19. <sect3 id="zend.validate.set.lessthan.options">
  20. <title>Zend_Validate_LessThan でサポートされるオプション</title>
  21. <para>
  22. <classname>Zend_Validate_LessThan</classname> では、下記のオプションがサポートされます。
  23. </para>
  24. <itemizedlist>
  25. <listitem>
  26. <para>
  27. <emphasis><property>max</property></emphasis>: 許される最大値を設定します。
  28. </para>
  29. </listitem>
  30. </itemizedlist>
  31. </sect3>
  32. <sect3 id="zend.validate.set.lessthan.basic">
  33. <title>基本的な使用法</title>
  34. <!-- TODO : to be translated -->
  35. <para>
  36. To validate if a given value is less than a defined border simply use the following
  37. example.
  38. </para>
  39. <programlisting language="php"><![CDATA[
  40. $valid = new Zend_Validate_LessThan(array('max' => 10));
  41. $value = 10;
  42. $return = $valid->isValid($value);
  43. // returns true
  44. ]]></programlisting>
  45. <para>
  46. The above example returns <constant>TRUE</constant> for all values which are equal to 10
  47. or lower than 10.
  48. </para>
  49. </sect3>
  50. </sect2>
  51. <!--
  52. vim:se ts=4 sw=4 et:
  53. -->