File: Zend_Validate-Hex.xml

package info (click to toggle)
zendframework 1.12.9%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 133,584 kB
  • sloc: xml: 1,311,829; php: 570,173; sh: 170; makefile: 125; sql: 121
file content (41 lines) | stat: -rw-r--r-- 1,249 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect2 id="zend.validate.set.hex">
    <title>Hex</title>

    <para>
        <classname>Zend_Validate_Hex</classname> allows you to validate if a given value contains
        only hexadecimal characters. These are all characters from <emphasis>0 to 9</emphasis> and
        <emphasis>A to F</emphasis> case insensitive. There is no length limitation for the input
        you want to validate.
    </para>

    <programlisting language="php"><![CDATA[
$validator = new Zend_Validate_Hex();
if ($validator->isValid('123ABC')) {
    // value contains only hex chars
} else {
    // false
}
]]></programlisting>

    <note>
        <title>Invalid characters</title>

        <para>
            All other characters will return false, including whitespace and decimal point. Also
            unicode zeros and numbers from other scripts than latin will not be treaten as valid.
        </para>
    </note>

    <sect3 id="zend.validate.set.hex.options">
        <title>Supported options for Zend_Validate_Hex</title>

        <para>
            There are no additional options for <classname>Zend_Validate_Hex</classname>:
        </para>
    </sect3>
</sect2>
<!--
vim:se ts=4 sw=4 et:
-->