Ver Fonte

[ZF-9032] Zend_Validate:

- improved error message

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@21135 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas há 16 anos atrás
pai
commit
a713b4864e

+ 1 - 1
library/Zend/Validate/Digits.php

@@ -49,7 +49,7 @@ class Zend_Validate_Digits extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOT_DIGITS   => "'%value%' contains characters which are no digits; but only digits are allowed",
+        self::NOT_DIGITS   => "'%value%' contains characters which are not digits; but only digits are allowed",
         self::STRING_EMPTY => "'%value%' is an empty string",
         self::INVALID      => "Invalid type given, value should be string, integer or float",
     );

+ 2 - 2
resources/languages/de/Zend_Validate.php

@@ -21,7 +21,7 @@
  */
 
 /**
- * EN-Revision: 21115
+ * EN-Revision: 21134
  */
 return array(
     // Zend_Validate_Alnum
@@ -72,7 +72,7 @@ return array(
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "Ungültiger Typ angegeben. Der Wert sollte ein Strung, Integer oder Float sein",
-    "'%value%' contains characters which are no digits; but only digits are allowed" => "'%value%' enthält Zeichen welche keine Ziffern sind; aber es sind nur Ziffern erlaubt",
+    "'%value%' contains characters which are not digits; but only digits are allowed" => "'%value%' enthält Zeichen welche keine Ziffern sind; aber es sind nur Ziffern erlaubt",
     "'%value%' is an empty string" => "'%value%' ist ein leerer String",
 
     // Zend_Validate_EmailAddress

+ 2 - 2
resources/languages/en/Zend_Validate.php

@@ -21,7 +21,7 @@
  */
 
 /**
- * EN-Revision: 21115
+ * EN-Revision: 21134
  */
 return array(
     // Zend_Validate_Alnum
@@ -72,7 +72,7 @@ return array(
 
     // Zend_Validate_Digits
     "Invalid type given, value should be string, integer or float" => "Invalid type given, value should be string, integer or float",
-    "'%value%' contains characters which are no digits; but only digits are allowed" => "'%value%' contains characters which are no digits; but only digits are allowed",
+    "'%value%' contains characters which are not digits; but only digits are allowed" => "'%value%' contains characters which are not digits; but only digits are allowed",
     "'%value%' is an empty string" => "'%value%' is an empty string",
 
     // Zend_Validate_EmailAddress

+ 1 - 1
tests/Zend/Validate/DigitsTest.php

@@ -127,7 +127,7 @@ class Zend_Validate_DigitsTest extends PHPUnit_Framework_TestCase
         $this->assertFalse($this->_validator->isValid('#'));
         $messages = $this->_validator->getMessages();
         $arrayExpected = array(
-            Zend_Validate_Digits::NOT_DIGITS => '\'#\' contains not only digit characters'
+            Zend_Validate_Digits::NOT_DIGITS => '\'#\' contains characters which are not digits; but only digits are allowed'
             );
         $this->assertThat($messages, $this->identicalTo($arrayExpected));
     }