Преглед изворни кода

[GENERIC] Zend_Validate:

- added translation resources for Zend_Validate
- fixed some API notes
- unified messages (no changes to constants)

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20352 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas пре 16 година
родитељ
комит
4b8e4eb865
44 измењених фајлова са 437 додато и 669 уклоњено
  1. 99 560
      documentation/manual/en/module_specs/Zend_Validate-Messages.xml
  2. 2 2
      library/Zend/Validate/Alnum.php
  3. 1 1
      library/Zend/Validate/Alpha.php
  4. 1 1
      library/Zend/Validate/Barcode.php
  5. 2 2
      library/Zend/Validate/CreditCard.php
  6. 1 1
      library/Zend/Validate/Date.php
  7. 4 2
      library/Zend/Validate/Db/Abstract.php
  8. 6 6
      library/Zend/Validate/EmailAddress.php
  9. 1 1
      library/Zend/Validate/File/Count.php
  10. 3 3
      library/Zend/Validate/File/Crc32.php
  11. 2 2
      library/Zend/Validate/File/ExcludeExtension.php
  12. 1 1
      library/Zend/Validate/File/Exists.php
  13. 2 2
      library/Zend/Validate/File/Extension.php
  14. 1 1
      library/Zend/Validate/File/FilesSize.php
  15. 3 3
      library/Zend/Validate/File/Hash.php
  16. 1 1
      library/Zend/Validate/File/ImageSize.php
  17. 3 3
      library/Zend/Validate/File/IsCompressed.php
  18. 3 3
      library/Zend/Validate/File/IsImage.php
  19. 3 3
      library/Zend/Validate/File/Md5.php
  20. 2 2
      library/Zend/Validate/File/MimeType.php
  21. 1 1
      library/Zend/Validate/File/NotExists.php
  22. 3 3
      library/Zend/Validate/File/Sha1.php
  23. 1 1
      library/Zend/Validate/File/Size.php
  24. 9 9
      library/Zend/Validate/File/Upload.php
  25. 1 1
      library/Zend/Validate/File/WordCount.php
  26. 1 1
      library/Zend/Validate/Float.php
  27. 1 1
      library/Zend/Validate/GreaterThan.php
  28. 1 1
      library/Zend/Validate/Hex.php
  29. 1 1
      library/Zend/Validate/Hostname.php
  30. 3 3
      library/Zend/Validate/Iban.php
  31. 1 1
      library/Zend/Validate/InArray.php
  32. 2 2
      library/Zend/Validate/Int.php
  33. 0 2
      library/Zend/Validate/Interface.php
  34. 1 1
      library/Zend/Validate/Ip.php
  35. 1 1
      library/Zend/Validate/Isbn.php
  36. 2 2
      library/Zend/Validate/PostCode.php
  37. 1 1
      library/Zend/Validate/Regex.php
  38. 1 1
      library/Zend/Validate/Sitemap/Changefreq.php
  39. 1 1
      library/Zend/Validate/Sitemap/Lastmod.php
  40. 1 1
      library/Zend/Validate/Sitemap/Loc.php
  41. 1 1
      library/Zend/Validate/Sitemap/Priority.php
  42. 1 1
      library/Zend/Validate/StringLength.php
  43. 259 0
      resources/languages/en/Zend_Validate.php
  44. 2 32
      tests/Zend/Filter/StripTagsTest.php

+ 99 - 560
documentation/manual/en/module_specs/Zend_Validate-Messages.xml

@@ -1,579 +1,117 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
 <sect1 id="zend.validate.messages">
-
     <title>Validation Messages</title>
 
     <para>
         Each validator which is based on <classname>Zend_Validate</classname> provides
         one or multiple messages in the case of a failed validation. You can use
-        this information for setting own messages or when you have to translate
-        the messages a validator can return. The following table lists all
-        available messages which are returned by each validator.
+        this information to set your own messages, or to translate existing messages which a
+        validator could return to something different.
     </para>
 
-    <table id="zend.validate.messages.table">
-        <title>Available Validation Messages</title>
-        <tgroup cols="3">
-            <thead>
-                <row>
-                    <entry>Validator</entry>
-                    <entry>Constant</entry>
-                    <entry>Message</entry>
-                </row>
-            </thead>
-            <tbody>
-                <row>
-                    <entry morerows="1" valign="middle">Alnum</entry>
-                    <entry><constant>NOT_ALNUM</constant></entry>
-                    <entry>'%value%' has not only alphabetic and digit characters</entry>
-                </row>
-                <row>
-                    <entry><constant>STRING_EMPTY</constant></entry>
-                    <entry>'%value%' is an empty string</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Alpha</entry>
-                    <entry><constant>NOT_ALPHA</constant></entry>
-                    <entry>'%value%' has not only alphabetic characters</entry>
-                </row>
-                <row>
-                    <entry><constant>STRING_EMPTY</constant></entry>
-                    <entry>'%value%' is an empty string</entry>
-                </row>
-                <row>
-                    <entry>Barcode</entry>
-                    <entry>---</entry>
-                    <entry>messages are thrown by a subclass</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">Barcode_Ean13</entry>
-                    <entry><constant>INVALID</constant></entry>
-                    <entry>'%value%' is an invalid <constant>EAN</constant>-13 barcode</entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_LENGTH</constant></entry>
-                    <entry>'%value%' should be 13 characters</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_NUMERIC</constant></entry>
-                    <entry>'%value%' should contain only numeric characters</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Barcode_UpcA</entry>
-                    <entry><constant>INVALID</constant></entry>
-                    <entry>'%value%' is an invalid <constant>UPC</constant>-A barcode</entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_LENGTH</constant></entry>
-                    <entry>'%value%' should be 12 characters</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Between</entry>
-                    <entry><constant>NOT_BETWEEN</constant></entry>
-                    <entry>'%value%' is not between '%min%' and '%max%', inclusively</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_BETWEEN_STRICT</constant></entry>
-                    <entry>'%value%' is not strictly between '%min%' and '%max%'</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Ccnum</entry>
-                    <entry><constant>LENGTH</constant></entry>
-                    <entry>'%value%' must contain between 13 and 19 digits</entry>
-                </row>
-                <row>
-                    <entry><constant>CHECKSUM</constant></entry>
-                    <entry>Luhn algorithm (mod-10 checksum) failed on '%value%'</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Date</entry>
-                    <entry><constant>FALSEFORMAT</constant></entry>
-                    <entry>'%value%' does not fit given date format</entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID</constant></entry>
-                    <entry>'%value%' does not appear to be a valid date</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Db_Abstract</entry>
-                    <entry><constant>ERROR_NO_RECORD_FOUND</constant></entry>
-                    <entry>No record matching %value% was found</entry>
-                </row>
-                <row>
-                    <entry><constant>ERROR_RECORD_FOUND</constant></entry>
-                    <entry>A record matching %value% was found</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Digits</entry>
-                    <entry><constant>NOT_DIGITS</constant></entry>
-                    <entry>'%value%' contains not only digit characters</entry>
-                </row>
-                <row>
-                    <entry><constant>STRING_EMPTY</constant></entry>
-                    <entry>'%value%' is an empty string</entry>
-                </row>
-                <row>
-                    <entry morerows="7" valign="middle">EmailAddress</entry>
-                    <entry><constant>INVALID</constant></entry>
-                    <entry>
-                        '%value%' is not a valid email address in the basic format
-                        local-part@hostname
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_FORMAT</constant></entry>
-                    <entry>'%value%' is not a valid email address in the basic format local-part@hostname</entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_HOSTNAME</constant></entry>
-                    <entry>'%hostname%' is not a valid hostname for email address '%value%'</entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_MX_RECORD</constant></entry>
-                    <entry>
-                        '%hostname%' does not appear to have a valid MX record for the email address
-                        '%value%'
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>DOT_ATOM</constant></entry>
-                    <entry>'%localPart%' not matched against dot-atom format</entry>
-                </row>
-                <row>
-                    <entry><constant>QUOTED_STRING</constant></entry>
-                    <entry>'%localPart%' not matched against quoted-string format</entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_LOCAL_PART</constant></entry>
-                    <entry>
-                        '%localPart%' is not a valid local part for email address '%value%'
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>LENGTH_EXCEEDED</constant></entry>
-                    <entry>'%value%' exceeds the allowed length</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">File_Count</entry>
-                    <entry><constant>TOO_MUCH</constant></entry>
-                    <entry>
-                        Too much files, maximum '%max%' are allowed but '%count%' are given
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>TOO_LESS</constant></entry>
-                    <entry>
-                        Too less files, minimum '%min%' are expected but '%count%' are given
-                    </entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_Crc32</entry>
-                    <entry><constant>DOES_NOT_MATCH</constant></entry>
-                    <entry>The file '%value%' does not match the given crc32 hashes</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>There was no crc32 hash detected for the given file</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' could not be found</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">File_ExcludeExtension</entry>
-                    <entry><constant>FALSE_EXTENSION</constant></entry>
-                    <entry>The file '%value%' has a false extension</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' was not found</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_ExcludeMimeType</entry>
-                    <entry><constant>FALSE_TYPE</constant></entry>
-                    <entry>The file '%value%' has a false mimetype of '%type%'</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>The mimetype of file '%value%' could not been detected</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_READABLE</constant></entry>
-                    <entry>The file '%value%' can not be read</entry>
-                </row>
-                <row>
-                    <entry>File_Exists</entry>
-                    <entry><constant>DOES_NOT_EXIST</constant></entry>
-                    <entry>The file '%value%' does not exist</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">File_Extension</entry>
-                    <entry><constant>FALSE_EXTENSION</constant></entry>
-                    <entry>The file '%value%' has a false extension</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' was not found</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_FilesSize</entry>
-                    <entry><constant>TOO_BIG</constant></entry>
-                    <entry>
-                        All files in sum should have a maximum size of '%max%' but '%size%' were
-                        detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>TOO_SMALL</constant></entry>
-                    <entry>
-                        All files in sum should have a minimum size of '%min%' but '%size%' were
-                        detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_READABLE</constant></entry>
-                    <entry>One or more files can not be read</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_Hash</entry>
-                    <entry><constant>DOES_NOT_MATCH</constant></entry>
-                    <entry>The file '%value%' does not match the given hashes</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>There was no hash detected for the given file</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' could not be found</entry>
-                </row>
-                <row>
-                    <entry morerows="5" valign="middle">File_ImageSize</entry>
-                    <entry><constant>WIDTH_TOO_BIG</constant></entry>
-                    <entry>
-                        Maximum allowed width for image '%value%' should be '%maxwidth%' but
-                        '%width%' detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>WIDTH_TOO_SMALL</constant></entry>
-                    <entry>
-                        Minimum expected width for image '%value%' should be '%minwidth%' but
-                        '%width%' detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>HEIGHT_TOO_BIG</constant></entry>
-                    <entry>
-                        Maximum allowed height for image '%value%' should be '%maxheight%' but
-                        '%height%' detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>HEIGHT_TOO_SMALL</constant></entry>
-                    <entry>
-                        Minimum expected height for image '%value%' should be '%minheight%' but
-                        '%height%' detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>The size of image '%value%' could not be detected</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_READABLE</constant></entry>
-                    <entry>The image '%value%' can not be read</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_IsCompressed</entry>
-                    <entry><constant>FALSE_TYPE</constant></entry>
-                    <entry>The file '%value%' is not compressed, '%type%' detected</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>The mimetype of file '%value%' could not been detected</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_READABLE</constant></entry>
-                    <entry>The file '%value%' can not be read</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_IsImage</entry>
-                    <entry><constant>FALSE_TYPE</constant></entry>
-                    <entry>The file '%value%' is no image, '%type%' detected</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>The mimetype of file '%value%' could not been detected</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_READABLE</constant></entry>
-                    <entry>The file '%value%' can not be read</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_Md5</entry>
-                    <entry><constant>DOES_NOT_MATCH</constant></entry>
-                    <entry>The file '%value%' does not match the given md5 hashes</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>There was no md5 hash detected for the given file</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' could not be found</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_MimeType</entry>
-                    <entry><constant>FALSE_TYPE</constant></entry>
-                    <entry>The file '%value%' has a false mimetype of '%type%'</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>The mimetype of file '%value%' could not been detected</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_READABLE</constant></entry>
-                    <entry>The file '%value%' can not be read</entry>
-                </row>
-                <row>
-                    <entry>File_NotExists</entry>
-                    <entry><constant>DOES_EXIST</constant></entry>
-                    <entry>The file '%value%' does exist</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_Sha1</entry>
-                    <entry><constant>DOES_NOT_MATCH</constant></entry>
-                    <entry>The file '%value%' does not match the given sha1 hashes</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_DETECTED</constant></entry>
-                    <entry>There was no sha1 hash detected for the given file</entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' could not be found</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_Size</entry>
-                    <entry><constant>TOO_BIG</constant></entry>
-                    <entry>
-                        Maximum allowed size for file '%value%' is '%max%' but '%size%' detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>TOO_SMALL</constant></entry>
-                    <entry>
-                        Minimum expected size for file '%value%' is '%min%' but '%size%' detected
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' could not be found</entry>
-                </row>
-                <row>
-                    <entry morerows="9" valign="middle">File_Upload</entry>
-                    <entry><constant>INI_SIZE</constant></entry>
-                    <entry>The file '%value%' exceeds the defined ini size</entry>
-                </row>
-                <row>
-                    <entry><constant>FORM_SIZE</constant></entry>
-                    <entry>The file '%value%' exceeds the defined form size</entry>
-                </row>
-                <row>
-                    <entry><constant>PARTIAL</constant></entry>
-                    <entry>The file '%value%' was only partially uploaded</entry>
-                </row>
-                <row>
-                    <entry><constant>NO_FILE</constant></entry>
-                    <entry>The file '%value%' was not uploaded</entry>
-                </row>
-                <row>
-                    <entry><constant>NO_TMP_DIR</constant></entry>
-                    <entry>No temporary directory was found for the file '%value%'</entry>
-                </row>
-                <row>
-                    <entry><constant>CANT_WRITE</constant></entry>
-                    <entry>The file '%value%' can't be written</entry>
-                </row>
-                <row>
-                    <entry><constant>EXTENSION</constant></entry>
-                    <entry>
-                        The extension returned an error while uploading the file '%value%'
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>ATTACK</constant></entry>
-                    <entry>The file '%value%' was illegal uploaded, possible attack</entry>
-                </row>
-                <row>
-                    <entry><constant>FILE_NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' was not found</entry>
-                </row>
-                <row>
-                    <entry><constant>UNKNOWN</constant></entry>
-                    <entry>Unknown error while uploading the file '%value%'</entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">File_WordCount</entry>
-                    <entry><constant>TOO_MUCH</constant></entry>
-                    <entry>
-                        Too much words, maximum '%max%' are allowed but '%count%' were counted
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>TOO_LESS</constant></entry>
-                    <entry>
-                        Too less words, minimum '%min%' are expected but '%count%' were counted
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>NOT_FOUND</constant></entry>
-                    <entry>The file '%value%' could not be found</entry>
-                </row>
-                <row>
-                    <entry>Float</entry>
-                    <entry><constant>NOT_FLOAT</constant></entry>
-                    <entry>'%value%' does not appear to be a float</entry>
-                </row>
-                <row>
-                    <entry>GreaterThan</entry>
-                    <entry><constant>NOT_GREATER</constant></entry>
-                    <entry>'%value%' is not greater than '%min%'</entry>
-                </row>
-                <row>
-                    <entry>Hex</entry>
-                    <entry><constant>NOT_HEX</constant></entry>
-                    <entry>'%value%' has not only hexadecimal digit characters</entry>
-                </row>
-                <row>
-                    <entry morerows="7" valign="middle">Hostname</entry>
-                    <entry><constant>IP_ADDRESS_NOT_ALLOWED</constant></entry>
-                    <entry>
-                        '%value%' appears to be an IP address, but IP addresses are not allowed
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>UNKNOWN_TLD</constant></entry>
-                    <entry>
-                        '%value%' appears to be a <acronym>DNS</acronym> hostname but cannot match <acronym>TLD</acronym> against known
-                        list
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_DASH</constant></entry>
-                    <entry>
-                        '%value%' appears to be a <acronym>DNS</acronym> hostname but contains a dash (-) in an invalid
-                        position
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_HOSTNAME_SCHEMA</constant></entry>
-                    <entry>
-                        '%value%' appears to be a <acronym>DNS</acronym> hostname but cannot match against hostname
-                        schema for <acronym>TLD</acronym> '%tld%'
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>UNDECIPHERABLE_TLD</constant></entry>
-                    <entry>
-                        '%value%' appears to be a <acronym>DNS</acronym> hostname but cannot extract <acronym>TLD</acronym> part
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_HOSTNAME</constant></entry>
-                    <entry>
-                        '%value%' does not match the expected structure for a <acronym>DNS</acronym> hostname
-                    </entry>
-                </row>
-                <row>
-                    <entry><constant>INVALID_LOCAL_NAME</constant></entry>
-                    <entry>'%value%' does not appear to be a valid local network name</entry>
-                </row>
-                <row>
-                    <entry><constant>LOCAL_NAME_NOT_ALLOWED</constant></entry>
-                    <entry>
-                        '%value%' appears to be a local network name but local network names are not
-                        allowed
-                    </entry>
-                </row>
-                <row>
-                    <entry morerows="2" valign="middle">Iban</entry>
-                    <entry><constant>NOTSUPPORTED</constant></entry>
-                    <entry>'%value%' does not have <acronym>IBAN</acronym></entry>
-                </row>
-                <row>
-                    <entry><constant>FALSEFORMAT</constant></entry>
-                    <entry>'%value%' has a false format</entry>
-                </row>
-                <row>
-                    <entry><constant>CHECKFAILED</constant></entry>
-                    <entry>'%value%' has failed the <acronym>IBAN</acronym> check</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">Identical</entry>
-                    <entry><constant>NOT_SAME</constant></entry>
-                    <entry>The token '%token%' does not match the given token '%value%'</entry>
-                </row>
-                <row>
-                    <entry><constant>MISSING_TOKEN</constant></entry>
-                    <entry>No token was provided to match against</entry>
-                </row>
-                <row>
-                    <entry>InArray</entry>
-                    <entry><constant>NOT_IN_ARRAY</constant></entry>
-                    <entry>'%value%' was not found in the haystack</entry>
-                </row>
-                <row>
-                    <entry>Int</entry>
-                    <entry><constant>NOT_INT</constant></entry>
-                    <entry>'%value%' does not appear to be an integer</entry>
-                </row>
-                <row>
-                    <entry>Ip</entry>
-                    <entry><constant>NOT_IP_ADDRESS</constant></entry>
-                    <entry>'%value%' does not appear to be a valid IP address</entry>
-                </row>
-                <row>
-                    <entry>LessThan</entry>
-                    <entry><constant>NOT_LESS</constant></entry>
-                    <entry>'%value%' is not less than '%max%'</entry>
-                </row>
-                <row>
-                    <entry>NotEmpty</entry>
-                    <entry><constant>IS_EMPTY</constant></entry>
-                    <entry>Value is required and can't be empty</entry>
-                </row>
-                <row>
-                    <entry>Regex</entry>
-                    <entry><constant>NOT_MATCH</constant></entry>
-                    <entry>'%value%' does not match against pattern '%pattern%'</entry>
-                </row>
-                <row>
-                    <entry morerows="1" valign="middle">StringLength</entry>
-                    <entry><constant>TOO_SHORT</constant></entry>
-                    <entry>'%value%' is less than %min% characters long</entry>
-                </row>
-                <row>
-                    <entry><constant>TOO_LONG</constant></entry>
-                    <entry>'%value%' is greater than %max% characters long</entry>
-                </row>
-            </tbody>
-        </tgroup>
-    </table>
+    <para>
+        These validation messages are constants which can be found at top of each validator class.
+        Let's look into <classname>Zend_Validate_GreaterThan</classname> for an descriptive example:
+    </para>
+
+    <programlisting language="php"><![CDATA[
+protected $_messageTemplates = array(
+    self::NOT_GREATER => "'%value%' is not greater than '%min%'",
+);
+]]></programlisting>
 
     <para>
-        Additionally you can retrieve all message templates of a validator with
-        the method <methodname>getMessageTemplates()</methodname>. It returns you an array
-        with the messages a validator could return in the case of a failed validation.
+        As you can see the constant <constant>self::NOT_GREATER</constant> refers to the failure and
+        is used as key, and the message itself is used as value of the message array.
+    </para>
+
+    <para>
+        You can retrieve all message templates from a validator by using the
+        <methodname>getMessageTemplates()</methodname> method. It returns you the above array which
+        contains all messages a validator could return in the case of a failed validation.
     </para>
 
     <programlisting language="php"><![CDATA[
-$validator = new Zend_Validate_Alnum();
+$validator = new Zend_Validate_GreaterThan();
 $messages  = $validator->getMessageTemplates();
 ]]></programlisting>
 
+    <para>
+        Using the <methodname>setMessage()</methodname> method you can set another message to be
+        returned in case of the specified failure.
+    </para>
+
+    <programlisting language="php"><![CDATA[
+$validator = new Zend_Validate_GreaterThan();
+$validator->setMessage('Please enter a lower value', Zend_Validate_GreaterThan::NOT_GREATER);
+]]></programlisting>
+
+    <para>
+        The second parameter defines the failure which will be overridden. When you omit this
+        parameter, then the given message will be set for all possible failures of this validator.
+    </para>
+
+    <sect2 id="zend.validate.messages.pretranslated">
+        <title>Using pre-translated validation messages</title>
+
+        <para>
+            Zend Framework is shipped with more than 45 different validators with more than 200
+            failure messages. It can be a tendious task to translate all of these messages. But for
+            your convinience Zend Framework comes with already pre-translated validation messages.
+            You can find them within the path <filename>/resources/languages</filename> in your
+            Zend Framework installation.
+        </para>
+
+        <note>
+            <title>Used path</title>
+
+            <para>
+                The resource files are outside of the library path because all of your translations
+                should also be outside of this path.
+            </para>
+        </note>
+
+        <para>
+            So to translate all validation messages to german for example, all you have to do is to
+            attach a translator to <classname>Zend_Validate</classname> using these resource files.
+        </para>
+
+        <programlisting language="php"><![CDATA[
+$translator = new Zend_Translate(
+    'array',
+    '/resources/languages',
+    $language,
+    array('scan' => Zend_Locale::LOCALE_DIRECTORY)
+);
+Zend_Validate_Abstract::setDefaultTranslator($translator);
+]]></programlisting>
+
+        <note>
+            <title>Used translation adapter</title>
+
+            <para>
+                As translation adapter Zend Framework choosed the array adapter. It is simple to
+                edit and created very fast.
+            </para>
+        </note>
+
+        <note>
+            <title>Supported languages</title>
+
+            <para>
+                This feature is very young, so the amount of supported languages may not be
+                complete. New languages will be added with each release. Additionally feel free to
+                use the existing resource files to make your own translations.
+            </para>
+
+            <para>
+                You could also use these resource files to rewrite existing translations. So you
+                are not in need to create these files manually yourself.
+            </para>
+        </note>
+    </sect2>
+
     <sect2 id="zend.validate.messages.limitation">
         <title>Limit the size of a validation message</title>
 
@@ -603,13 +141,14 @@ Zend_Validate::setMessageLength(100);
 ]]></programlisting>
 
         <note>
+            <title>Where is this parameter used?</title>
+
             <para>
-                Note that the set message length is used for all validators, even for self defined ones
+                The set message length is used for all validators, even for self defined ones,
                 as long as they extend <classname>Zend_Validate_Abstract</classname>.
             </para>
         </note>
     </sect2>
-
 </sect1>
 <!--
 vim:se ts=4 sw=4 et:

+ 2 - 2
library/Zend/Validate/Alnum.php

@@ -58,8 +58,8 @@ class Zend_Validate_Alnum extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::INVALID      => "Invalid type given, value should be float, string, or integer",
-        self::NOT_ALNUM    => "'%value%' has not only alphabetic and digit characters",
-        self::STRING_EMPTY => "'%value%' is an empty string"
+        self::NOT_ALNUM    => "'%value%' contains characters which are non alphabetic and no digits",
+        self::STRING_EMPTY => "'%value%' is an empty string",
     );
 
     /**

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

@@ -58,7 +58,7 @@ class Zend_Validate_Alpha extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::INVALID      => "Invalid type given, value should be a string",
-        self::NOT_ALPHA    => "'%value%' has not only alphabetic characters",
+        self::NOT_ALPHA    => "'%value%' contains non alphabetic characters",
         self::STRING_EMPTY => "'%value%' is an empty string"
     );
 

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

@@ -45,7 +45,7 @@ class Zend_Validate_Barcode extends Zend_Validate_Abstract
     protected $_messageTemplates = array(
         self::FAILED         => "'%value%' failed checksum validation",
         self::INVALID_CHARS  => "'%value%' contains invalid characters",
-        self::INVALID_LENGTH => "'%value%' should be %length% characters",
+        self::INVALID_LENGTH => "'%value%' should have a length of %length% characters",
         self::INVALID        => "Invalid type given, value should be string",
     );
 

+ 2 - 2
library/Zend/Validate/CreditCard.php

@@ -67,10 +67,10 @@ class Zend_Validate_CreditCard extends Zend_Validate_Abstract
         self::CHECKSUM       => "Luhn algorithm (mod-10 checksum) failed on '%value%'",
         self::CONTENT        => "'%value%' must contain only digits",
         self::INVALID        => "Invalid type given, value should be a string",
-        self::LENGTH         => "'%value%' contains a invalid amount of digits",
+        self::LENGTH         => "'%value%' contains an invalid amount of digits",
         self::PREFIX         => "'%value%' is not from an allowed institute",
         self::SERVICE        => "Validation of '%value%' has been failed by the service",
-        self::SERVICEFAILURE => "The service returned a failure while validating '%value%'"
+        self::SERVICEFAILURE => "The service returned a failure while validating '%value%'",
     );
 
     /**

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

@@ -44,7 +44,7 @@ class Zend_Validate_Date extends Zend_Validate_Abstract
     protected $_messageTemplates = array(
         self::INVALID        => "Invalid type given, value should be string, integer, array or Zend_Date",
         self::INVALID_DATE   => "'%value%' does not appear to be a valid date",
-        self::FALSEFORMAT    => "'%value%' does not fit the date format '%format%'"
+        self::FALSEFORMAT    => "'%value%' does not fit the date format '%format%'",
     );
 
     /**

+ 4 - 2
library/Zend/Validate/Db/Abstract.php

@@ -44,8 +44,10 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract
     /**
      * @var array Message templates
      */
-    protected $_messageTemplates = array(self::ERROR_NO_RECORD_FOUND => 'No record matching %value% was found',
-                                         self::ERROR_RECORD_FOUND    => 'A record matching %value% was found');
+    protected $_messageTemplates = array(
+        self::ERROR_NO_RECORD_FOUND => 'No record matching %value% was found',
+        self::ERROR_RECORD_FOUND    => 'A record matching %value% was found',
+    );
 
     /**
      * @var string

+ 6 - 6
library/Zend/Validate/EmailAddress.php

@@ -52,14 +52,14 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::INVALID            => "Invalid type given, value should be a string",
-        self::INVALID_FORMAT     => "'%value%' is not a valid email address in the basic format local-part@hostname",
-        self::INVALID_HOSTNAME   => "'%hostname%' is not a valid hostname for email address '%value%'",
+        self::INVALID_FORMAT     => "'%value%' is no valid email address in the basic format local-part@hostname",
+        self::INVALID_HOSTNAME   => "'%hostname%' is no valid hostname for email address '%value%'",
         self::INVALID_MX_RECORD  => "'%hostname%' does not appear to have a valid MX record for the email address '%value%'",
         self::INVALID_SEGMENT    => "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network.",
-        self::DOT_ATOM           => "'%localPart%' not matched against dot-atom format",
-        self::QUOTED_STRING      => "'%localPart%' not matched against quoted-string format",
-        self::INVALID_LOCAL_PART => "'%localPart%' is not a valid local part for email address '%value%'",
-        self::LENGTH_EXCEEDED    => "'%value%' exceeds the allowed length"
+        self::DOT_ATOM           => "'%localPart%' can not be matched against dot-atom format",
+        self::QUOTED_STRING      => "'%localPart%' can not be matched against quoted-string format",
+        self::INVALID_LOCAL_PART => "'%localPart%' is no valid local part for email address '%value%'",
+        self::LENGTH_EXCEEDED    => "'%value%' exceeds the allowed length",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/File/Count.php

@@ -46,7 +46,7 @@ class Zend_Validate_File_Count extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::TOO_MANY => "Too many files, maximum '%max%' are allowed but '%count%' are given",
-        self::TOO_FEW  => "Too few files, minimum '%min%' are expected but '%count%' are given"
+        self::TOO_FEW  => "Too few files, minimum '%min%' are expected but '%count%' are given",
     );
 
     /**

+ 3 - 3
library/Zend/Validate/File/Crc32.php

@@ -45,9 +45,9 @@ class Zend_Validate_File_Crc32 extends Zend_Validate_File_Hash
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::DOES_NOT_MATCH => "The file '%value%' does not match the given crc32 hashes",
-        self::NOT_DETECTED   => "There was no crc32 hash detected for the given file",
-        self::NOT_FOUND      => "The file '%value%' could not be found"
+        self::DOES_NOT_MATCH => "File '%value%' does not match the given crc32 hashes",
+        self::NOT_DETECTED   => "A crc32 hash could not be evaluated for the given file",
+        self::NOT_FOUND      => "File '%value%' could not be found",
     );
 
     /**

+ 2 - 2
library/Zend/Validate/File/ExcludeExtension.php

@@ -44,8 +44,8 @@ class Zend_Validate_File_ExcludeExtension extends Zend_Validate_File_Extension
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::FALSE_EXTENSION => "The file '%value%' has a false extension",
-        self::NOT_FOUND       => "The file '%value%' was not found"
+        self::FALSE_EXTENSION => "File '%value%' has a false extension",
+        self::NOT_FOUND       => "File '%value%' could not be found",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/File/Exists.php

@@ -43,7 +43,7 @@ class Zend_Validate_File_Exists extends Zend_Validate_Abstract
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::DOES_NOT_EXIST => "The file '%value%' does not exist"
+        self::DOES_NOT_EXIST => "File '%value%' does not exist",
     );
 
     /**

+ 2 - 2
library/Zend/Validate/File/Extension.php

@@ -44,8 +44,8 @@ class Zend_Validate_File_Extension extends Zend_Validate_Abstract
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::FALSE_EXTENSION => "The file '%value%' has a false extension",
-        self::NOT_FOUND       => "The file '%value%' was not found"
+        self::FALSE_EXTENSION => "File '%value%' has a false extension",
+        self::NOT_FOUND       => "File '%value%' could not be found",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/File/FilesSize.php

@@ -47,7 +47,7 @@ class Zend_Validate_File_FilesSize extends Zend_Validate_File_Size
     protected $_messageTemplates = array(
         self::TOO_BIG      => "All files in sum should have a maximum size of '%max%' but '%size%' were detected",
         self::TOO_SMALL    => "All files in sum should have a minimum size of '%min%' but '%size%' were detected",
-        self::NOT_READABLE => "One or more files can not be read"
+        self::NOT_READABLE => "One or more files can not be read",
     );
 
     /**

+ 3 - 3
library/Zend/Validate/File/Hash.php

@@ -45,9 +45,9 @@ class Zend_Validate_File_Hash extends Zend_Validate_Abstract
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::DOES_NOT_MATCH => "The file '%value%' does not match the given hashes",
-        self::NOT_DETECTED   => "There was no hash detected for the given file",
-        self::NOT_FOUND      => "The file '%value%' could not be found"
+        self::DOES_NOT_MATCH => "File '%value%' does not match the given hashes",
+        self::NOT_DETECTED   => "A hash could not be evaluated for the given file",
+        self::NOT_FOUND      => "File '%value%' could not be found"
     );
 
     /**

+ 1 - 1
library/Zend/Validate/File/ImageSize.php

@@ -53,7 +53,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract
         self::HEIGHT_TOO_BIG   => "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected",
         self::HEIGHT_TOO_SMALL => "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected",
         self::NOT_DETECTED     => "The size of image '%value%' could not be detected",
-        self::NOT_READABLE     => "The image '%value%' can not be read"
+        self::NOT_READABLE     => "File '%value%' can not be read",
     );
 
     /**

+ 3 - 3
library/Zend/Validate/File/IsCompressed.php

@@ -45,9 +45,9 @@ class Zend_Validate_File_IsCompressed extends Zend_Validate_File_MimeType
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::FALSE_TYPE   => "The file '%value%' is not compressed, '%type%' detected",
-        self::NOT_DETECTED => "The mimetype of file '%value%' has not been detected",
-        self::NOT_READABLE => "The file '%value%' can not be read"
+        self::FALSE_TYPE   => "File '%value%' is not compressed, '%type%' detected",
+        self::NOT_DETECTED => "The mimetype of file '%value%' could not been detected",
+        self::NOT_READABLE => "File '%value%' can not be read",
     );
 
     /**

+ 3 - 3
library/Zend/Validate/File/IsImage.php

@@ -45,9 +45,9 @@ class Zend_Validate_File_IsImage extends Zend_Validate_File_MimeType
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::FALSE_TYPE   => "The file '%value%' is no image, '%type%' detected",
-        self::NOT_DETECTED => "The mimetype of file '%value%' has not been detected",
-        self::NOT_READABLE => "The file '%value%' can not be read"
+        self::FALSE_TYPE   => "File '%value%' is no image, '%type%' detected",
+        self::NOT_DETECTED => "The mimetype of file '%value%' could not been detected",
+        self::NOT_READABLE => "File '%value%' can not be read",
     );
 
     /**

+ 3 - 3
library/Zend/Validate/File/Md5.php

@@ -45,9 +45,9 @@ class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::DOES_NOT_MATCH => "The file '%value%' does not match the given md5 hashes",
-        self::NOT_DETECTED   => "There was no md5 hash detected for the given file",
-        self::NOT_FOUND      => "The file '%value%' could not be found"
+        self::DOES_NOT_MATCH => "File '%value%' does not match the given md5 hashes",
+        self::NOT_DETECTED   => "A md5 hash could not be evaluated for the given file",
+        self::NOT_FOUND      => "File '%value%' could not be found",
     );
 
     /**

+ 2 - 2
library/Zend/Validate/File/MimeType.php

@@ -46,9 +46,9 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::FALSE_TYPE   => "The file '%value%' has a false mimetype of '%type%'",
+        self::FALSE_TYPE   => "File '%value%' has a false mimetype of '%type%'",
         self::NOT_DETECTED => "The mimetype of file '%value%' could not been detected",
-        self::NOT_READABLE => "The file '%value%' can not be read"
+        self::NOT_READABLE => "File '%value%' can not be read",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/File/NotExists.php

@@ -43,7 +43,7 @@ class Zend_Validate_File_NotExists extends Zend_Validate_File_Exists
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::DOES_EXIST => "The file '%value%' does exist"
+        self::DOES_EXIST => "File '%value%' exists",
     );
 
     /**

+ 3 - 3
library/Zend/Validate/File/Sha1.php

@@ -45,9 +45,9 @@ class Zend_Validate_File_Sha1 extends Zend_Validate_File_Hash
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::DOES_NOT_MATCH => "The file '%value%' does not match the given sha1 hashes",
-        self::NOT_DETECTED   => "There was no sha1 hash detected for the given file",
-        self::NOT_FOUND      => "The file '%value%' could not be found"
+        self::DOES_NOT_MATCH => "File '%value%' does not match the given sha1 hashes",
+        self::NOT_DETECTED   => "A sha1 hash could not be evaluated for the given file",
+        self::NOT_FOUND      => "File '%value%' could not be found",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/File/Size.php

@@ -48,7 +48,7 @@ class Zend_Validate_File_Size extends Zend_Validate_Abstract
     protected $_messageTemplates = array(
         self::TOO_BIG   => "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected",
         self::TOO_SMALL => "Minimum expected size for file '%value%' is '%min%' but '%size%' detected",
-        self::NOT_FOUND => "The file '%value%' could not be found"
+        self::NOT_FOUND => "File '%value%' could not be found",
     );
 
     /**

+ 9 - 9
library/Zend/Validate/File/Upload.php

@@ -53,16 +53,16 @@ class Zend_Validate_File_Upload extends Zend_Validate_Abstract
      * @var array Error message templates
      */
     protected $_messageTemplates = array(
-        self::INI_SIZE       => "The file '%value%' exceeds the defined ini size",
-        self::FORM_SIZE      => "The file '%value%' exceeds the defined form size",
-        self::PARTIAL        => "The file '%value%' was only partially uploaded",
-        self::NO_FILE        => "The file '%value%' was not uploaded",
-        self::NO_TMP_DIR     => "No temporary directory was found for the file '%value%'",
-        self::CANT_WRITE     => "The file '%value%' can't be written",
+        self::INI_SIZE       => "File '%value%' exceeds the defined ini size",
+        self::FORM_SIZE      => "File '%value%' exceeds the defined form size",
+        self::PARTIAL        => "File '%value%' was only partially uploaded",
+        self::NO_FILE        => "File '%value%' was not uploaded",
+        self::NO_TMP_DIR     => "No temporary directory was found for file '%value%'",
+        self::CANT_WRITE     => "File '%value%' can't be written",
         self::EXTENSION      => "The extension returned an error while uploading the file '%value%'",
-        self::ATTACK         => "The file '%value%' was illegal uploaded, possible attack",
-        self::FILE_NOT_FOUND => "The file '%value%' was not found",
-        self::UNKNOWN        => "Unknown error while uploading the file '%value%'"
+        self::ATTACK         => "File '%value%' was illegal uploaded, possible attack",
+        self::FILE_NOT_FOUND => "File '%value%' was not found",
+        self::UNKNOWN        => "Unknown error while uploading file '%value%'"
     );
 
     /**

+ 1 - 1
library/Zend/Validate/File/WordCount.php

@@ -48,7 +48,7 @@ class Zend_Validate_File_WordCount extends Zend_Validate_File_Count
     protected $_messageTemplates = array(
         self::TOO_MUCH => "Too much words, maximum '%max%' are allowed but '%count%' were counted",
         self::TOO_LESS => "Too less words, minimum '%min%' are expected but '%count%' were counted",
-        self::NOT_FOUND => "The file '%value%' could not be found"
+        self::NOT_FOUND => "File '%value%' could not be found",
     );
 
     /**

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

@@ -45,7 +45,7 @@ class Zend_Validate_Float extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::INVALID   => "Invalid type given, value should be float, string, or integer",
-        self::NOT_FLOAT => "'%value%' does not appear to be a float"
+        self::NOT_FLOAT => "'%value%' does not appear to be a float",
     );
 
     protected $_locale;

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

@@ -39,7 +39,7 @@ class Zend_Validate_GreaterThan extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOT_GREATER => "'%value%' is not greater than '%min%'"
+        self::NOT_GREATER => "'%value%' is not greater than '%min%'",
     );
 
     /**

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

@@ -42,7 +42,7 @@ class Zend_Validate_Hex extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::INVALID => "Invalid type given, value should be a string",
-        self::NOT_HEX => "'%value%' has not only hexadecimal digit characters"
+        self::NOT_HEX => "'%value%' has not only hexadecimal digit characters",
     );
 
     /**

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

@@ -70,7 +70,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
         self::INVALID_HOSTNAME        => "'%value%' does not match the expected structure for a DNS hostname",
         self::INVALID_LOCAL_NAME      => "'%value%' does not appear to be a valid local network name",
         self::LOCAL_NAME_NOT_ALLOWED  => "'%value%' appears to be a local network name but local network names are not allowed",
-        self::CANNOT_DECODE_PUNYCODE  => "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded"
+        self::CANNOT_DECODE_PUNYCODE  => "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded",
     );
 
     /**

+ 3 - 3
library/Zend/Validate/Iban.php

@@ -44,9 +44,9 @@ class Zend_Validate_Iban extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOTSUPPORTED => "'%value%' does not have IBAN",
-        self::FALSEFORMAT  => "'%value%' has a false format",
-        self::CHECKFAILED  => "'%value%' has failed the IBAN check"
+        self::NOTSUPPORTED => "Unknown country within the IBAN '%value%'",
+        self::FALSEFORMAT  => "'%value%' has a false IBAN format",
+        self::CHECKFAILED  => "'%value%' has failed the IBAN check",
     );
 
     /**

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

@@ -38,7 +38,7 @@ class Zend_Validate_InArray extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOT_IN_ARRAY => "'%value%' was not found in the haystack"
+        self::NOT_IN_ARRAY => "'%value%' was not found in the haystack",
     );
 
     /**

+ 2 - 2
library/Zend/Validate/Int.php

@@ -44,8 +44,8 @@ class Zend_Validate_Int extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::INVALID => "Invalid type given, value should be a string or a integer",
-        self::NOT_INT => "'%value%' does not appear to be an integer"
+        self::INVALID => "Invalid type given, value should be string or integer",
+        self::NOT_INT => "'%value%' does not appear to be an integer",
     );
 
     protected $_locale;

+ 0 - 2
library/Zend/Validate/Interface.php

@@ -1,5 +1,4 @@
 <?php
-
 /**
  * Zend Framework
  *
@@ -20,7 +19,6 @@
  * @version    $Id$
  */
 
-
 /**
  * @category   Zend
  * @package    Zend_Validate

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

@@ -40,7 +40,7 @@ class Zend_Validate_Ip extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::INVALID        => "Invalid type given, value should be a string",
-        self::NOT_IP_ADDRESS => "'%value%' does not appear to be a valid IP address"
+        self::NOT_IP_ADDRESS => "'%value%' does not appear to be a valid IP address",
     );
 
     /**

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

@@ -43,7 +43,7 @@ class Zend_Validate_Isbn extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::INVALID => "'%value%' is an invalid ISBN",
+        self::INVALID => "'%value%' is no valid ISBN number",
     );
 
     /**

+ 2 - 2
library/Zend/Validate/PostCode.php

@@ -44,8 +44,8 @@ class Zend_Validate_PostCode extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::INVALID  => "Invalid type given, value should be a string or a integer",
-        self::NO_MATCH => "'%value%' does not appear to be an postal code"
+        self::INVALID  => "Invalid type given, value should be string or integer",
+        self::NO_MATCH => "'%value%' does not appear to be an postal code",
     );
 
     /**

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

@@ -40,7 +40,7 @@ class Zend_Validate_Regex extends Zend_Validate_Abstract
      */
     protected $_messageTemplates = array(
         self::INVALID   => "Invalid type given, value should be string, integer or float",
-        self::NOT_MATCH => "'%value%' does not match against pattern '%pattern%'"
+        self::NOT_MATCH => "'%value%' does not match against pattern '%pattern%'",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/Sitemap/Changefreq.php

@@ -50,7 +50,7 @@ class Zend_Validate_Sitemap_Changefreq extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOT_VALID => "'%value%' is not a valid sitemap changefreq",
+        self::NOT_VALID => "'%value%' is no valid sitemap changefreq",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/Sitemap/Lastmod.php

@@ -56,7 +56,7 @@ class Zend_Validate_Sitemap_Lastmod extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOT_VALID => "'%value%' is not a valid sitemap lastmod",
+        self::NOT_VALID => "'%value%' is no valid sitemap lastmod",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/Sitemap/Loc.php

@@ -55,7 +55,7 @@ class Zend_Validate_Sitemap_Loc extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOT_VALID => "'%value%' is not a valid sitemap location",
+        self::NOT_VALID => "'%value%' is no valid sitemap location",
     );
 
     /**

+ 1 - 1
library/Zend/Validate/Sitemap/Priority.php

@@ -50,7 +50,7 @@ class Zend_Validate_Sitemap_Priority extends Zend_Validate_Abstract
      * @var array
      */
     protected $_messageTemplates = array(
-        self::NOT_VALID => "'%value%' is not a valid sitemap priority",
+        self::NOT_VALID => "'%value%' is no valid sitemap priority",
     );
 
     /**

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

@@ -42,7 +42,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract
     protected $_messageTemplates = array(
         self::INVALID   => "Invalid type given, value should be a string",
         self::TOO_SHORT => "'%value%' is less than %min% characters long",
-        self::TOO_LONG  => "'%value%' is greater than %max% characters long"
+        self::TOO_LONG  => "'%value%' is more than %max% characters long",
     );
 
     /**

+ 259 - 0
resources/languages/en/Zend_Validate.php

@@ -0,0 +1,259 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Translate
+ * @subpackage Ressource
+ * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id:$
+ */
+
+/**
+ * EN-Revision: 20350
+ */
+return array(
+    // Zend_Validate_Alnum
+    "Invalid type given, value should be float, string, or integer" => "Invalid type given, value should be float, string, or integer",
+    "'%value%' contains characters which are non alphabetic and no digits" => "'%value%' contains characters which are non alphabetic and no digits",
+    "'%value%' is an empty string" => "'%value%' is an empty string",
+
+    // Zend_Validate_Alpha
+    "Invalid type given, value should be a string" => "Invalid type given, value should be a string",
+    "'%value%' contains non alphabetic characters" => "'%value%' contains non alphabetic characters",
+    "'%value%' is an empty string" => "'%value%' is an empty string",
+
+    // Zend_Validate_Barcode
+    "'%value%' failed checksum validation" => "'%value%' failed checksum validation",
+    "'%value%' contains invalid characters" => "'%value%' contains invalid characters",
+    "'%value%' should have a length of %length% characters" => "'%value%' should have a length of %length% characters",
+    "Invalid type given, value should be string" => "Invalid type given, value should be string",
+
+    // Zend_Validate_Between
+    "'%value%' is not between '%min%' and '%max%', inclusively" => "'%value%' is not between '%min%' and '%max%', inclusively",
+    "'%value%' is not strictly between '%min%' and '%max%'" => "'%value%' is not strictly between '%min%' and '%max%'",
+
+    // Zend_Validate_Callback
+    "'%value%' is not valid" => "'%value%' is not valid",
+    "Failure within the callback, exception returned" => "Failure within the callback, exception returned",
+
+    // Zend_Validate_Ccnum
+    "'%value%' must contain between 13 and 19 digits" => "'%value%' must contain between 13 and 19 digits",
+    "Luhn algorithm (mod-10 checksum) failed on '%value%'" => "Luhn algorithm (mod-10 checksum) failed on '%value%'",
+
+    // Zend_Validate_CreditCard
+    "Luhn algorithm (mod-10 checksum) failed on '%value%'" => "Luhn algorithm (mod-10 checksum) failed on '%value%'",
+    "'%value%' must contain only digits" => "'%value%' must contain only digits",
+    "Invalid type given, value should be a string" => "Invalid type given, value should be a string",
+    "'%value%' contains an invalid amount of digits" => "'%value%' contains an invalid amount of digits",
+    "'%value%' is not from an allowed institute" => "'%value%' is not from an allowed institute",
+    "Validation of '%value%' has been failed by the service" => "Validation of '%value%' has been failed by the service",
+    "The service returned a failure while validating '%value%'" => "The service returned a failure while validating '%value%'",
+
+    // Zend_Validate_Date
+    "Invalid type given, value should be string, integer, array or Zend_Date" => "Invalid type given, value should be string, integer, array or Zend_Date",
+    "'%value%' does not appear to be a valid date" => "'%value%' does not appear to be a valid date",
+    "'%value%' does not fit the date format '%format'" => "'%value%' does not fit the date format '%format'",
+
+    // Zend_Validate_Db_Abstract
+    "No record matching %value% was found" => "No record matching %value% was found",
+    "A record matching %value% was found" => "A record matching %value% was found",
+
+    // 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 not only digit characters" => "'%value%' contains not only digit characters",
+    "'%value%' is an empty string" => "'%value%' is an empty string",
+
+    // Zend_Validate_EmailAddress
+    "Invalid type given, value should be a string" => "Invalid type given, value should be a string",
+    "'%value%' is no valid email address in the basic format local-part@hostname" => "'%value%' is no valid email address in the basic format local-part@hostname",
+    "'%hostname%' is no valid hostname for email address '%value%'" => "'%hostname%' is no valid hostname for email address '%value%'",
+    "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "'%hostname%' does not appear to have a valid MX record for the email address '%value%'",
+    "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network." => "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network.",
+    "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' can not be matched against dot-atom format",
+    "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' can not be matched against quoted-string format",
+    "'%localPart%' is no valid local part for email address '%value%'" => "'%localPart%' is no valid local part for email address '%value%'",
+    "'%value%' exceeds the allowed length" => "'%value%' exceeds the allowed length",
+
+    // Zend_Validate_File_Count
+    "Too many files, maximum '%max%' are allowed but '%count%' are given" => "Too many files, maximum '%max%' are allowed but '%count%' are given",
+    "Too few files, minimum '%min%' are expected but '%count%' are given" => "Too few files, minimum '%min%' are expected but '%count%' are given",
+
+    // Zend_Validate_File_Crc32
+    "File '%value%' does not match the given crc32 hashes" => "File '%value%' does not match the given crc32 hashes",
+    "A crc32 hash could not be evaluated for the given file" => "A crc32 hash could not be evaluated for the given file",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_File_ExcludeExtension
+    "File '%value%' has a false extension" => "File '%value%' has a false extension",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_File_ExcludeMimeType
+    "File '%value%' has a false mimetype of '%type%'" => "File '%value%' has a false mimetype of '%type%'",
+    "The mimetype of file '%value%' could not been detected" => "The mimetype of file '%value%' could not been detected",
+    "File '%value%' can not be read" => "File '%value%' can not be read",
+
+    // Zend_Validate_File_Exists
+    "File '%value%' does not exist" => "File '%value%' does not exist",
+
+    // Zend_Validate_File_Extension
+    "File '%value%' has a false extension" => "File '%value%' has a false extension",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_File_FilesSize
+    "All files in sum should have a maximum size of '%max%' but '%size%' were detected" => "All files in sum should have a maximum size of '%max%' but '%size%' were detected",
+    "All files in sum should have a minimum size of '%min%' but '%size%' were detected" => "All files in sum should have a minimum size of '%min%' but '%size%' were detected",
+    "One or more files can not be read" => "One or more files can not be read",
+
+    // Zend_Validate_File_Hash
+    "File '%value%' does not match the given hashes" => "File '%value%' does not match the given hashes",
+    "A hash could not be evaluated for the given file" => "A hash could not be evaluated for the given file",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_File_ImageSize
+    "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected" => "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected",
+    "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected" => "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected",
+    "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected" => "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected",
+    "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected" => "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected",
+    "The size of image '%value%' could not be detected" => "The size of image '%value%' could not be detected",
+    "File '%value%' can not be read" => "File '%value%' can not be read",
+
+    // Zend_Validate_File_IsCompressed
+    "File '%value%' is not compressed, '%type%' detected" => "File '%value%' is not compressed, '%type%' detected",
+    "The mimetype of file '%value%' could not been detected" => "The mimetype of file '%value%' could not been detected",
+    "File '%value%' can not be read" => "File '%value%' can not be read",
+
+    // Zend_Validate_File_IsImage
+    "File '%value%' is no image, '%type%' detected" => "File '%value%' is no image, '%type%' detected",
+    "The mimetype of file '%value%' could not been detected" => "The mimetype of file '%value%' could not been detected",
+    "File '%value%' can not be read" => "File '%value%' can not be read",
+
+    // Zend_Validate_File_Md5
+    "File '%value%' does not match the given md5 hashes" => "File '%value%' does not match the given md5 hashes",
+    "A md5 hash could not be evaluated for the given file" => "A md5 hash could not be evaluated for the given file",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_File_MimeType
+    "File '%value%' has a false mimetype of '%type%'" => "File '%value%' has a false mimetype of '%type%'",
+    "The mimetype of file '%value%' could not been detected" => "The mimetype of file '%value%' could not been detected",
+    "File '%value%' can not be read" => "File '%value%' can not be read",
+
+    // Zend_Validate_File_NotExists
+    "File '%value%' exists" => "File '%value%' exists",
+
+    // Zend_Validate_File_Sha1
+    "File '%value%' does not match the given sha1 hashes" => "File '%value%' does not match the given sha1 hashes",
+    "A sha1 hash could not be evaluated for the given file" => "A sha1 hash could not be evaluated for the given file",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_File_Size
+    "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected" => "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected",
+    "Minimum expected size for file '%value%' is '%min%' but '%size%' detected" => "Minimum expected size for file '%value%' is '%min%' but '%size%' detected",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_File_Upload
+    "File '%value%' exceeds the defined ini size" => "File '%value%' exceeds the defined ini size",
+    "File '%value%' exceeds the defined form size" => "File '%value%' exceeds the defined form size",
+    "File '%value%' was only partially uploaded" => "File '%value%' was only partially uploaded",
+    "File '%value%' was not uploaded" => "File '%value%' was not uploaded",
+    "No temporary directory was found for file '%value%'" => "No temporary directory was found for file '%value%'",
+    "File '%value%' can't be written" => "File '%value%' can't be written",
+    "The extension returned an error while uploading the file '%value%'" => "The extension returned an error while uploading the file '%value%'",
+    "File '%value%' was illegal uploaded, possible attack" => "File '%value%' was illegal uploaded, possible attack",
+    "File '%value%' was not found" => "File '%value%' was not found",
+    "Unknown error while uploading file '%value%'" => "Unknown error while uploading file '%value%'",
+
+    // Zend_Validate_File_WordCount
+    "Too much words, maximum '%max%' are allowed but '%count%' were counted" => "Too much words, maximum '%max%' are allowed but '%count%' were counted",
+    "Too less words, minimum '%min%' are expected but '%count%' were counted" => "Too less words, minimum '%min%' are expected but '%count%' were counted",
+    "File '%value%' could not be found" => "File '%value%' could not be found",
+
+    // Zend_Validate_Float
+    "Invalid type given, value should be float, string, or integer" => "Invalid type given, value should be float, string, or integer",
+    "'%value%' does not appear to be a float" => "'%value%' does not appear to be a float",
+
+    // Zend_Validate_GreaterThan
+    "'%value%' is not greater than '%min%'" => "'%value%' is not greater than '%min%'",
+
+    // Zend_Validate_Hex
+    "Invalid type given, value should be a string" => "Invalid type given, value should be a string",
+    "'%value%' has not only hexadecimal digit characters" => "'%value%' has not only hexadecimal digit characters",
+
+    // Zend_Validate_Hostname
+    "Invalid type given, value should be a string" => "Invalid type given, value should be a string",
+    "'%value%' appears to be an IP address, but IP addresses are not allowed" => "'%value%' appears to be an IP address, but IP addresses are not allowed",
+    "'%value%' appears to be a DNS hostname but cannot match TLD against known list" => "'%value%' appears to be a DNS hostname but cannot match TLD against known list",
+    "'%value%' appears to be a DNS hostname but contains a dash in an invalid position" => "'%value%' appears to be a DNS hostname but contains a dash in an invalid position",
+    "'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'" => "'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'",
+    "'%value%' appears to be a DNS hostname but cannot extract TLD part" => "'%value%' appears to be a DNS hostname but cannot extract TLD part",
+    "'%value%' does not match the expected structure for a DNS hostname" => "'%value%' does not match the expected structure for a DNS hostname",
+    "'%value%' does not appear to be a valid local network name" => "'%value%' does not appear to be a valid local network name",
+    "'%value%' appears to be a local network name but local network names are not allowed" => "'%value%' appears to be a local network name but local network names are not allowed",
+    "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded" => "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded",
+
+    // Zend_Validate_Iban
+    "Unknown country within the IBAN '%value%'" => "Unknown country within the IBAN '%value%'",
+    "'%value%' has a false IBAN format" => "'%value%' has a false IBAN format",
+    "'%value%' has failed the IBAN check" => "'%value%' has failed the IBAN check",
+
+    // Zend_Validate_Identical
+    "The token '%token%' does not match the given token '%value%'" => "The token '%token%' does not match the given token '%value%'",
+    "No token was provided to match against" => "No token was provided to match against",
+
+    // Zend_Validate_InArray
+    "'%value%' was not found in the haystack" => "'%value%' was not found in the haystack",
+
+    // Zend_Validate_Int
+    "Invalid type given, value should be string or integer" => "Invalid type given, value should be string or integer",
+    "'%value%' does not appear to be an integer" => "'%value%' does not appear to be an integer",
+
+    // Zend_Validate_Ip
+    "Invalid type given, value should be a string" => "Invalid type given, value should be a string",
+    "'%value%' does not appear to be a valid IP address" => "'%value%' does not appear to be a valid IP address",
+
+    // Zend_Validate_Isbn
+    "'%value%' is no valid ISBN number" => "'%value%' is no valid ISBN number",
+
+    // Zend_Validate_LessThan
+    "'%value%' is not less than '%max%'" => "'%value%' is not less than '%max%'",
+
+    // Zend_Validate_NotEmpty
+    "Invalid type given, value should be float, string, array, boolean or integer" => "Invalid type given, value should be float, string, array, boolean or integer",
+    "Value is required and can't be empty" => "Value is required and can't be empty",
+
+    // Zend_Validate_PostCode
+    "Invalid type given, value should be string or integer" => "Invalid type given, value should be string or integer",
+    "'%value%' does not appear to be an postal code" => "'%value%' does not appear to be an postal code",
+
+    // Zend_Validate_Regex
+    "Invalid type given, value should be string, integer or float" => "Invalid type given, value should be string, integer or float",
+    "'%value%' does not match against pattern '%pattern%'" => "'%value%' does not match against pattern '%pattern%'",
+
+    // Zend_Validate_Sitemap_Changefreq
+    "'%value%' is no valid sitemap changefreq" => "'%value%' is no valid sitemap changefreq",
+
+    // Zend_Validate_Sitemap_Lastmod
+    "'%value%' is no valid sitemap lastmod" => "'%value%' is no valid sitemap lastmod",
+
+    // Zend_Validate_Sitemap_Loc
+    "'%value%' is no valid sitemap location" => "'%value%' is no valid sitemap location",
+
+    // Zend_Validate_Sitemap_Priority
+    "'%value%' is no valid sitemap priority" => "'%value%' is no valid sitemap priority",
+
+    // Zend_Validate_StringLength
+    "Invalid type given, value should be a string" => "Invalid type given, value should be a string",
+    "'%value%' is less than %min% characters long" => "'%value%' is less than %min% characters long",
+    "'%value%' is more than %max% characters long" => "'%value%' is more than %max% characters long",
+);

+ 2 - 32
tests/Zend/Filter/StripTagsTest.php

@@ -433,8 +433,8 @@ class Zend_Filter_StripTagsTest extends PHPUnit_Framework_TestCase
     }
 
     /**
-     * Ensures expected behavior when comments are marked as allowed (in our
-     * case, this should have no effect) and a comment contains tags and
+     * Ensures expected behavior when comments are marked as allowed (in our 
+     * case, this should have no effect) and a comment contains tags and 
      * linebreaks
      *
      * @group ZF-8473
@@ -523,36 +523,6 @@ class Zend_Filter_StripTagsTest extends PHPUnit_Framework_TestCase
         $filtered = $this->_filter->filter($input);
         $this->assertNotContains('onclick', $filtered);
     }
-
-    /**
-     * @ZF-8828
-     */
-    public function testFilterIsoChars()
-    {
-        $input    = 'äöü<!-- a comment -->äöü';
-        $expected = 'äöüäöü';
-        $this->assertEquals($expected, $this->_filter->filter($input));
-
-        $input    = 'äöü<!-- a comment -->äöü';
-        $input    = iconv("UTF-8", "ISO-8859-1", $input);
-        $output   = $this->_filter->filter($input);
-        $this->assertFalse(empty($output));
-    }
-
-    /**
-     * @ZF-8828
-     */
-    public function testFilterIsoCharsInComment()
-    {
-        $input    = 'äöü<!--üßüßüß-->äöü';
-        $expected = 'äöüäöü';
-        $this->assertEquals($expected, $this->_filter->filter($input));
-
-        $input    = 'äöü<!-- a comment -->äöü';
-        $input    = iconv("UTF-8", "ISO-8859-1", $input);
-        $output   = $this->_filter->filter($input);
-        $this->assertFalse(empty($output));
-    }
 }
 
 // Call Zend_Filter_StripTagsTest::main() if this source file is executed directly.