Zend_Validate-Hex.xml 1.2 KB

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