|
|
@@ -0,0 +1,49 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!-- Reviewed: no -->
|
|
|
+<!-- EN-Revision: 21762 -->
|
|
|
+<sect2 id="zend.validate.set.digits">
|
|
|
+ <title>数字</title>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ <classname>Zend_Validate_Digit</classname> は、与えられた値が数字だけを含むかどうか検証します。
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <sect3 id="zend.validate.set.digits.options">
|
|
|
+ <title>Zend_Validate_Digits でサポートされるオプション</title>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ <classname>Zend_Validate_Digits</classname> に対する追加オプションはありません。
|
|
|
+ </para>
|
|
|
+ </sect3>
|
|
|
+
|
|
|
+ <sect3 id="zend.validate.set.digits.basic">
|
|
|
+ <title>数字を検証</title>
|
|
|
+
|
|
|
+ <!-- TODO : to be translated -->
|
|
|
+ <para>
|
|
|
+ To validate if a given value contains only digits and no other characters, simply call
|
|
|
+ the validator like shown in this example:
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
+$validator = new Zend_Validate_Digits();
|
|
|
+
|
|
|
+$validator->isValid("1234567890"); // returns true
|
|
|
+$validator->isValid(1234); // returns true
|
|
|
+$validator->isValid('1a234'); // returns false
|
|
|
+]]></programlisting>
|
|
|
+
|
|
|
+ <note>
|
|
|
+ <title>数値を検証</title>
|
|
|
+
|
|
|
+ <!-- TODO : to be translated -->
|
|
|
+ <para>
|
|
|
+ When you want to validate numbers or numeric values, be aware that this validator
|
|
|
+ only validates digits. This means that any other sign like a thousand separator or
|
|
|
+ a comma will not pass this validator. In this case you should use
|
|
|
+ <classname>Zend_Validate_Int</classname> or
|
|
|
+ <classname>Zend_Validate_Float</classname>.
|
|
|
+ </para>
|
|
|
+ </note>
|
|
|
+ </sect3>
|
|
|
+</sect2>
|