|
|
@@ -1,580 +1,124 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<!-- EN-Revision: 18942 -->
|
|
|
+<!-- EN-Revision: 20352 -->
|
|
|
<!-- Reviewed: no -->
|
|
|
<sect1 id="zend.validate.messages">
|
|
|
-
|
|
|
<title>Prüfungsmeldungen</title>
|
|
|
|
|
|
<para>
|
|
|
Jede Prüfung die auf <classname>Zend_Validate</classname> basiert, bietet im Fall einer
|
|
|
fehlgeschlagen Prüfung eine oder mehrere Meldungen an. Diese Information kann verwendet
|
|
|
- werden um eigene Meldungen zu setzen, oder um die Meldungen die eine Prüfung zurückgeben
|
|
|
- kann zu übersetzen. Die folgende Tabelle zeigt alle vorhandenen Meldungen welche von
|
|
|
- jeder einzelner Prüfung zurückgegeben wird.
|
|
|
+ werden um eigene Meldungen zu setzen, oder bestehende Meldungen welche eine Prüfung
|
|
|
+ zurückgeben könnte, auf etwas anderes zu übersetzen.
|
|
|
</para>
|
|
|
|
|
|
- <table id="zend.validate.messages.table">
|
|
|
- <title>Vorhandene Prüfmeldungen</title>
|
|
|
- <tgroup cols="3">
|
|
|
- <thead>
|
|
|
- <row>
|
|
|
- <entry>Prüfung</entry>
|
|
|
- <entry>Konstante</entry>
|
|
|
- <entry>Meldung</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>
|
|
|
+ Diese Prüfmeldungen sind Konstanten welche am Beginn jeder Prüfklasse gefunden werden
|
|
|
+ können. Sehen wir uns für ein beschreibendes Beispiel
|
|
|
+ <classname>Zend_Validate_GreaterThan</classname> an:
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
+protected $_messageTemplates = array(
|
|
|
+ self::NOT_GREATER => "'%value%' is not greater than '%min%'",
|
|
|
+);
|
|
|
+]]></programlisting>
|
|
|
|
|
|
<para>
|
|
|
- Zusätzlich kann man alle Meldungstemplates einer Prüfung mit der Methode
|
|
|
- <methodname>getMessageTemplates()</methodname> erhalten. Sie gibt ein Array mit den
|
|
|
- Meldungen zurück die eine Prüfung im Fall einer fehlgeschlagenen Prüfung zurückgeben könnte.
|
|
|
+ Wie man siehr referenziert die Konstante <constant>self::NOT_GREATER</constant> auf den
|
|
|
+ Fehler und wird als Schlüssel verwendet. Und die Nachricht selbst ist der Wert des
|
|
|
+ Nachrichtenarrays.
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Man kann alle Nachrichten Templates einer Prüfung erhalten indem man die Methode
|
|
|
+ <methodname>getMessageTemplates()</methodname> verwendet. Diese gibt das oben stehende array
|
|
|
+ zurück, welches alle Nachrichten enthält die eine Prüfung im Falle einer fehlgeschlagenen
|
|
|
+ Prüfung zurückgeben kann.
|
|
|
</para>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
-$validator = new Zend_Validate_Alnum();
|
|
|
+$validator = new Zend_Validate_GreaterThan();
|
|
|
$messages = $validator->getMessageTemplates();
|
|
|
]]></programlisting>
|
|
|
|
|
|
+ <para>
|
|
|
+ Indem die Methode <methodname>setMessage()</methodname> verwendet wird kann man eine andere
|
|
|
+ Meldung definieren die im Fall des spezifizierten Fehlers zurückgegeben werden.
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
+$validator = new Zend_Validate_GreaterThan();
|
|
|
+$validator->setMessage('Bitte einen kleineren Wert angeben', Zend_Validate_GreaterThan::NOT_GREATER);
|
|
|
+]]></programlisting>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Der zweite Parameter definiert den Fehler der überschrieben wird. Wenn man diesen Parameter
|
|
|
+ nicht angibt, wird die angegebene Meldung für alle möglichen Fehler dieser Prüfung gesetzt.
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <sect2 id="zend.validate.messages.pretranslated">
|
|
|
+ <title>Verwendung vor-übersetzter Prüfungsmeldungen</title>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Zend Framework wird mit mehr als 45 unterschiedlichen Prüfern und mehr als 200
|
|
|
+ Fehlermeldungen ausgeliefert. Es kann eine zeitraubende Aufgabe sein alle diese
|
|
|
+ Meldungen zu übersetzen. Aber der Bequemlichkeit halber kommt Zend Framework mit
|
|
|
+ bereits vor-übersetzten Prüfmeldungen. Diese können im Pfad
|
|
|
+ <filename>/resources/languages</filename> der eigenen Zend Framework Installation
|
|
|
+ gefunden werden.
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <note>
|
|
|
+ <title>Verwendeter Pfad</title>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Die Ressource Dateien liegen ausserhalb des Bibliothekspfads weil alle Übersetzungen
|
|
|
+ ausserhalb dieses Pfades liegen sollten.
|
|
|
+ </para>
|
|
|
+ </note>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Um also alle Prüfmeldungen zum Beispiel auf Deutsch zu übersetzen muss man nur einen
|
|
|
+ Übersetzer an <classname>Zend_Validate</classname> anhängen der diese Ressourcedateien
|
|
|
+ verwendet.
|
|
|
+ </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>Verwendeter Übersetzungsadapter</title>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Als Übersetzungsadapter hat Zend Framework den Array Adapter ausgewählt. Er ist
|
|
|
+ einfach zu bearbeiten und sehr schnell erstellt.
|
|
|
+ </para>
|
|
|
+ </note>
|
|
|
+
|
|
|
+ <note>
|
|
|
+ <title>Unterstützte Sprachen</title>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Dieses Feature ist sehr jung, und deshalb ist die Anzahl der unterstützten Sprachen
|
|
|
+ nicht sehr komplett. Neue Sprachen werden mit jedem Release hinzugefügt. Zusätzlich
|
|
|
+ können die existierenden Ressourcedateien verwendet werden um eigene Übersetzungen
|
|
|
+ durchzuführen.
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <para>
|
|
|
+ Man kann diese Ressource Dateien auch verwenden um existierende Übersetzungen
|
|
|
+ umzuschreiben. Man muss diese Dateien also nicht selbst per Hand erstellen.
|
|
|
+ </para>
|
|
|
+ </note>
|
|
|
+ </sect2>
|
|
|
+
|
|
|
<sect2 id="zend.validate.messages.limitation">
|
|
|
<title>Begrenzen der Größe einer Prüfungsmeldung</title>
|
|
|
|
|
|
@@ -606,15 +150,13 @@ Zend_Validate::setMessageLength(100);
|
|
|
]]></programlisting>
|
|
|
|
|
|
<note>
|
|
|
+ <title>Wo wird dieser Parameter verwendet?</title>
|
|
|
+
|
|
|
<para>
|
|
|
- Es ist zu beachten das die gesetzte Länge der Nachrichten für alle Prüfungen
|
|
|
- verwendet wird, sogar für selbstdefinierte, solange Sie
|
|
|
- <classname>Zend_Validate_Abstract</classname> erweitern.
|
|
|
+ Die gesetzte Länge der Nachrichten wird für alle Prüfungen verwendet, sogar für
|
|
|
+ selbstdefinierte, solange Sie <classname>Zend_Validate_Abstract</classname>
|
|
|
+ erweitern.
|
|
|
</para>
|
|
|
</note>
|
|
|
</sect2>
|
|
|
-
|
|
|
</sect1>
|
|
|
-<!--
|
|
|
-vim:se ts=4 sw=4 et:
|
|
|
--->
|