Zend_Validate-Hex.xml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <!-- EN-Revision: 21241 -->
  4. <sect2 id="zend.validate.set.hex">
  5. <title>Hex</title>
  6. <!-- TODO : to be translated -->
  7. <para>
  8. <classname>Zend_Validate_Hex</classname> allows you to validate if a given value contains
  9. only hexadecimal characters. These are all characters from <emphasis>0 to 9</emphasis> and
  10. <emphasis>A to F</emphasis> case insensitive. There is no length limitation for the input
  11. you want to validate.
  12. </para>
  13. <programlisting language="php"><![CDATA[
  14. $validator = new Zend_Validate_Hex();
  15. if ($validator->isValid('123ABC')) {
  16. // value contains only hex chars
  17. } else {
  18. // false
  19. }
  20. ]]></programlisting>
  21. <note>
  22. <title>Invalid characters</title>
  23. <para>
  24. All other characters will return false, including whitespace and decimal point. Also
  25. unicode zeros and numbers from other scripts than latin will not be treaten as valid.
  26. </para>
  27. </note>
  28. <sect3 id="zend.validate.set.hex.options">
  29. <title>Zend_Validate_Hex でサポートされるオプション</title>
  30. <para>
  31. <classname>Zend_Validate_Hex</classname> に対する追加オプションはありません。
  32. </para>
  33. </sect3>
  34. </sect2>
  35. <!--
  36. vim:se ts=4 sw=4 et:
  37. -->