Zend_Validate-GreaterThan.xml 1.9 KB

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