Prechádzať zdrojové kódy

Fix ZF-12213: Zend_Validate - Writing Validators - outdated. Patch by Martin Hujer.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24845 44c647ce-9c0f-0410-b52a-842ac1e357ba
rob 13 rokov pred
rodič
commit
ae8a069738

+ 2 - 4
documentation/manual/en/module_specs/Zend_Validate-WritingValidators.xml

@@ -72,7 +72,7 @@ class MyValid_Float extends Zend_Validate_Abstract
         $this->_setValue($value);
         $this->_setValue($value);
 
 
         if (!is_float($value)) {
         if (!is_float($value)) {
-            $this->_error();
+            $this->_error(self::FLOAT);
             return false;
             return false;
         }
         }
 
 
@@ -86,9 +86,7 @@ class MyValid_Float extends Zend_Validate_Abstract
             the built-in magic parameter, <emphasis>%value%</emphasis>. The call to
             the built-in magic parameter, <emphasis>%value%</emphasis>. The call to
             <methodname>_setValue()</methodname> prepares the object to insert the tested value into
             <methodname>_setValue()</methodname> prepares the object to insert the tested value into
             the failure message automatically, should the value fail validation. The call to
             the failure message automatically, should the value fail validation. The call to
-            <methodname>_error()</methodname> tracks a reason for validation failure. Since this
-            class only defines one failure message, it is not necessary to provide
-            <methodname>_error()</methodname> with the name of the failure message template.
+            <methodname>_error()</methodname> tracks a reason for validation failure.
         </para>
         </para>
     </example>
     </example>