Zend_Validate-Messages.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- EN-Revision: 15157 -->
  3. <!-- Reviewed: no -->
  4. <sect1 id="zend.validate.messages">
  5. <title>Prüfungsmeldungen</title>
  6. <para>
  7. Jede Prüfung die auf <classname>Zend_Validate</classname> basiert, bietet im Fall einer
  8. fehlgeschlagen Prüfung eine oder mehrere Meldungen an. Diese Information kann verwendet
  9. werden um eigene Meldungen zu setzen, oder um die Meldungen die eine Prüfung zurückgeben
  10. kann zu übersetzen. Die folgende Tabelle zeigt alle vorhandenen Meldungen welche von
  11. jeder einzelner Prüfung zurückgegeben wird.
  12. </para>
  13. <table id="zend.validate.messages.table">
  14. <title>Vorhandene Prüfmeldungen</title>
  15. <tgroup cols="4">
  16. <thead>
  17. <row>
  18. <entry>Prüfung</entry>
  19. <entry>Konstante</entry>
  20. <entry>Meldung</entry>
  21. </row>
  22. </thead>
  23. <tbody>
  24. <row>
  25. <entry morerows="1" valign="middle">Alnum</entry>
  26. <entry>NOT_ALNUM</entry>
  27. <entry>'%value%' has not only alphabetic and digit characters</entry>
  28. </row>
  29. <row>
  30. <entry>STRING_EMPTY</entry>
  31. <entry>'%value%' is an empty string</entry>
  32. </row>
  33. <row>
  34. <entry morerows="1" valign="middle">Alpha</entry>
  35. <entry>NOT_ALPHA</entry>
  36. <entry>'%value%' has not only alphabetic characters</entry>
  37. </row>
  38. <row>
  39. <entry>STRING_EMPTY</entry>
  40. <entry>'%value%' is an empty string</entry>
  41. </row>
  42. <row>
  43. <entry>Barcode</entry>
  44. <entry>---</entry>
  45. <entry>messages are thrown by a subclass</entry>
  46. </row>
  47. <row>
  48. <entry morerows="2" valign="middle">Barcode_Ean13</entry>
  49. <entry>INVALID</entry>
  50. <entry>'%value%' is an invalid EAN-13 barcode</entry>
  51. </row>
  52. <row>
  53. <entry>INVALID_LENGTH</entry>
  54. <entry>'%value%' should be 13 characters</entry>
  55. </row>
  56. <row>
  57. <entry>NOT_NUMERIC</entry>
  58. <entry>'%value%' should contain only numeric characters</entry>
  59. </row>
  60. <row>
  61. <entry morerows="1" valign="middle">Barcode_UpcA</entry>
  62. <entry>INVALID</entry>
  63. <entry>'%value%' is an invalid UPC-A barcode</entry>
  64. </row>
  65. <row>
  66. <entry>INVALID_LENGTH</entry>
  67. <entry>'%value%' should be 12 characters</entry>
  68. </row>
  69. <row>
  70. <entry morerows="1" valign="middle">Between</entry>
  71. <entry>NOT_BETWEEN</entry>
  72. <entry>'%value%' is not between '%min%' and '%max%', inclusively</entry>
  73. </row>
  74. <row>
  75. <entry>NOT_BETWEEN_STRICT</entry>
  76. <entry>'%value%' is not strictly between '%min%' and '%max%'</entry>
  77. </row>
  78. <row>
  79. <entry morerows="1" valign="middle">Ccnum</entry>
  80. <entry>LENGTH</entry>
  81. <entry>'%value%' must contain between 13 and 19 digits</entry>
  82. </row>
  83. <row>
  84. <entry>CHECKSUM</entry>
  85. <entry>Luhn algorithm (mod-10 checksum) failed on '%value%'</entry>
  86. </row>
  87. <row>
  88. <entry morerows="2" valign="middle">Date</entry>
  89. <entry>FALSEFORMAT</entry>
  90. <entry>'%value%' does not fit given date format</entry>
  91. </row>
  92. <row>
  93. <entry>INVALID</entry>
  94. <entry>'%value%' does not appear to be a valid date</entry>
  95. </row>
  96. <row>
  97. <entry>NOT_YYYY_MM_DD</entry>
  98. <entry>'%value%' is not of the format YYYY-MM-DD</entry>
  99. </row>
  100. <row>
  101. <entry morerows="1" valign="middle">Digits</entry>
  102. <entry>NOT_DIGITS</entry>
  103. <entry>'%value%' contains not only digit characters</entry>
  104. </row>
  105. <row>
  106. <entry>STRING_EMPTY</entry>
  107. <entry>'%value%' is an empty string</entry>
  108. </row>
  109. <row>
  110. <entry morerows="6" valign="middle">EmailAddress</entry>
  111. <entry>INVALID</entry>
  112. <entry>'%value%' is not a valid email address in the basic format local-part@hostname</entry>
  113. </row>
  114. <row>
  115. <entry>INVALID_HOSTNAME</entry>
  116. <entry>'%hostname%' is not a valid hostname for email address '%value%'</entry>
  117. </row>
  118. <row>
  119. <entry>INVALID_MX_RECORD</entry>
  120. <entry>'%hostname%' does not appear to have a valid MX record for the email address '%value%'</entry>
  121. </row>
  122. <row>
  123. <entry>DOT_ATOM</entry>
  124. <entry>'%localPart%' not matched against dot-atom format</entry>
  125. </row>
  126. <row>
  127. <entry>QUOTED_STRING</entry>
  128. <entry>'%localPart%' not matched against quoted-string format</entry>
  129. </row>
  130. <row>
  131. <entry>INVALID_LOCAL_PART</entry>
  132. <entry>'%localPart%' is not a valid local part for email address '%value%'</entry>
  133. </row>
  134. <row>
  135. <entry>LENGTH_EXCEEDED</entry>
  136. <entry>'%value%' exceeds the allowed length</entry>
  137. </row>
  138. <row>
  139. <entry morerows="1" valign="middle">File_Count</entry>
  140. <entry>TOO_MUCH</entry>
  141. <entry>Too much files, maximum '%max%' are allowed but '%count%' are given</entry>
  142. </row>
  143. <row>
  144. <entry>TOO_LESS</entry>
  145. <entry>Too less files, minimum '%min%' are expected but '%count%' are given</entry>
  146. </row>
  147. <row>
  148. <entry morerows="2" valign="middle">File_Crc32</entry>
  149. <entry>DOES_NOT_MATCH</entry>
  150. <entry>The file '%value%' does not match the given crc32 hashes</entry>
  151. </row>
  152. <row>
  153. <entry>NOT_DETECTED</entry>
  154. <entry>There was no crc32 hash detected for the given file</entry>
  155. </row>
  156. <row>
  157. <entry>NOT_FOUND</entry>
  158. <entry>The file '%value%' could not be found</entry>
  159. </row>
  160. <row>
  161. <entry morerows="1" valign="middle">File_ExcludeExtension</entry>
  162. <entry>FALSE_EXTENSION</entry>
  163. <entry>The file '%value%' has a false extension</entry>
  164. </row>
  165. <row>
  166. <entry>NOT_FOUND</entry>
  167. <entry>The file '%value%' was not found</entry>
  168. </row>
  169. <row>
  170. <entry morerows="2" valign="middle">File_ExcludeMimeType</entry>
  171. <entry>FALSE_TYPE</entry>
  172. <entry>The file '%value%' has a false mimetype of '%type%'</entry>
  173. </row>
  174. <row>
  175. <entry>NOT_DETECTED</entry>
  176. <entry>The mimetype of file '%value%' could not been detected</entry>
  177. </row>
  178. <row>
  179. <entry>NOT_READABLE</entry>
  180. <entry>The file '%value%' can not be read</entry>
  181. </row>
  182. <row>
  183. <entry morerows="2" valign="middle">File_Exists</entry>
  184. <entry>DOES_NOT_EXIST</entry>
  185. <entry>The file '%value%' does not exist</entry>
  186. </row>
  187. <row>
  188. <entry morerows="1" valign="middle">File_Extension</entry>
  189. <entry>FALSE_EXTENSION</entry>
  190. <entry>The file '%value%' has a false extension</entry>
  191. </row>
  192. <row>
  193. <entry>NOT_FOUND</entry>
  194. <entry>The file '%value%' was not found</entry>
  195. </row>
  196. <row>
  197. <entry morerows="2" valign="middle">File_FilesSize</entry>
  198. <entry>TOO_BIG</entry>
  199. <entry>All files in sum should have a maximum size of '%max%' but '%size%' were detected</entry>
  200. </row>
  201. <row>
  202. <entry>TOO_SMALL</entry>
  203. <entry>All files in sum should have a minimum size of '%min%' but '%size%' were detected</entry>
  204. </row>
  205. <row>
  206. <entry>NOT_READABLE</entry>
  207. <entry>One or more files can not be read</entry>
  208. </row>
  209. <row>
  210. <entry morerows="2" valign="middle">File_Hash</entry>
  211. <entry>DOES_NOT_MATCH</entry>
  212. <entry>The file '%value%' does not match the given hashes</entry>
  213. </row>
  214. <row>
  215. <entry>NOT_DETECTED</entry>
  216. <entry>There was no hash detected for the given file</entry>
  217. </row>
  218. <row>
  219. <entry>NOT_FOUND</entry>
  220. <entry>The file '%value%' could not be found</entry>
  221. </row>
  222. <row>
  223. <entry morerows="5" valign="middle">File_ImageSize</entry>
  224. <entry>WIDTH_TOO_BIG</entry>
  225. <entry>Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected</entry>
  226. </row>
  227. <row>
  228. <entry>WIDTH_TOO_SMALL</entry>
  229. <entry>Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected</entry>
  230. </row>
  231. <row>
  232. <entry>HEIGHT_TOO_BIG</entry>
  233. <entry>Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected</entry>
  234. </row>
  235. <row>
  236. <entry>HEIGHT_TOO_SMALL</entry>
  237. <entry>Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected</entry>
  238. </row>
  239. <row>
  240. <entry>NOT_DETECTED</entry>
  241. <entry>The size of image '%value%' could not be detected</entry>
  242. </row>
  243. <row>
  244. <entry>NOT_READABLE</entry>
  245. <entry>The image '%value%' can not be read</entry>
  246. </row>
  247. <row>
  248. <entry morerows="2" valign="middle">File_IsCompressed</entry>
  249. <entry>FALSE_TYPE</entry>
  250. <entry>The file '%value%' is not compressed, '%type%' detected</entry>
  251. </row>
  252. <row>
  253. <entry>NOT_DETECTED</entry>
  254. <entry>The mimetype of file '%value%' could not been detected</entry>
  255. </row>
  256. <row>
  257. <entry>NOT_READABLE</entry>
  258. <entry>The file '%value%' can not be read</entry>
  259. </row>
  260. <row>
  261. <entry morerows="2" valign="middle">File_IsImage</entry>
  262. <entry>FALSE_TYPE</entry>
  263. <entry>The file '%value%' is no image, '%type%' detected</entry>
  264. </row>
  265. <row>
  266. <entry>NOT_DETECTED</entry>
  267. <entry>The mimetype of file '%value%' could not been detected</entry>
  268. </row>
  269. <row>
  270. <entry>NOT_READABLE</entry>
  271. <entry>The file '%value%' can not be read</entry>
  272. </row>
  273. <row>
  274. <entry morerows="2" valign="middle">File_Md5</entry>
  275. <entry>DOES_NOT_MATCH</entry>
  276. <entry>The file '%value%' does not match the given md5 hashes</entry>
  277. </row>
  278. <row>
  279. <entry>NOT_DETECTED</entry>
  280. <entry>There was no md5 hash detected for the given file</entry>
  281. </row>
  282. <row>
  283. <entry>NOT_FOUND</entry>
  284. <entry>The file '%value%' could not be found</entry>
  285. </row>
  286. <row>
  287. <entry morerows="2" valign="middle">File_MimeType</entry>
  288. <entry>FALSE_TYPE</entry>
  289. <entry>The file '%value%' has a false mimetype of '%type%'</entry>
  290. </row>
  291. <row>
  292. <entry>NOT_DETECTED</entry>
  293. <entry>The mimetype of file '%value%' could not been detected</entry>
  294. </row>
  295. <row>
  296. <entry>NOT_READABLE</entry>
  297. <entry>The file '%value%' can not be read</entry>
  298. </row>
  299. <row>
  300. <entry>File_NotExists</entry>
  301. <entry>DOES_EXIST</entry>
  302. <entry>The file '%value%' does exist</entry>
  303. </row>
  304. <row>
  305. <entry morerows="2" valign="middle">File_Sha1</entry>
  306. <entry>DOES_NOT_MATCH</entry>
  307. <entry>The file '%value%' does not match the given sha1 hashes</entry>
  308. </row>
  309. <row>
  310. <entry>NOT_DETECTED</entry>
  311. <entry>There was no sha1 hash detected for the given file</entry>
  312. </row>
  313. <row>
  314. <entry>NOT_FOUND</entry>
  315. <entry>The file '%value%' could not be found</entry>
  316. </row>
  317. <row>
  318. <entry morerows="2" valign="middle">File_Size</entry>
  319. <entry>TOO_BIG</entry>
  320. <entry>Maximum allowed size for file '%value%' is '%max%' but '%size%' detected</entry>
  321. </row>
  322. <row>
  323. <entry>TOO_SMALL</entry>
  324. <entry>Minimum expected size for file '%value%' is '%min%' but '%size%' detected</entry>
  325. </row>
  326. <row>
  327. <entry>NOT_FOUND</entry>
  328. <entry>The file '%value%' could not be found</entry>
  329. </row>
  330. <row>
  331. <entry morerows="9" valign="middle">File_Upload</entry>
  332. <entry>INI_SIZE</entry>
  333. <entry>The file '%value%' exceeds the defined ini size</entry>
  334. </row>
  335. <row>
  336. <entry>FORM_SIZE</entry>
  337. <entry>The file '%value%' exceeds the defined form size</entry>
  338. </row>
  339. <row>
  340. <entry>PARTIAL</entry>
  341. <entry>The file '%value%' was only partially uploaded</entry>
  342. </row>
  343. <row>
  344. <entry>NO_FILE</entry>
  345. <entry>The file '%value%' was not uploaded</entry>
  346. </row>
  347. <row>
  348. <entry>NO_TMP_DIR</entry>
  349. <entry>No temporary directory was found for the file '%value%'</entry>
  350. </row>
  351. <row>
  352. <entry>CANT_WRITE</entry>
  353. <entry>The file '%value%' can't be written</entry>
  354. </row>
  355. <row>
  356. <entry>EXTENSION</entry>
  357. <entry>The extension returned an error while uploading the file '%value%'</entry>
  358. </row>
  359. <row>
  360. <entry>ATTACK</entry>
  361. <entry>The file '%value%' was illegal uploaded, possible attack</entry>
  362. </row>
  363. <row>
  364. <entry>FILE_NOT_FOUND</entry>
  365. <entry>The file '%value%' was not found</entry>
  366. </row>
  367. <row>
  368. <entry>UNKNOWN</entry>
  369. <entry>Unknown error while uploading the file '%value%'</entry>
  370. </row>
  371. <row>
  372. <entry morerows="2" valign="middle">File_WordCount</entry>
  373. <entry>TOO_MUCH</entry>
  374. <entry>Too much words, maximum '%max%' are allowed but '%count%' were counted</entry>
  375. </row>
  376. <row>
  377. <entry>TOO_LESS</entry>
  378. <entry>Too less words, minimum '%min%' are expected but '%count%' were counted</entry>
  379. </row>
  380. <row>
  381. <entry>NOT_FOUND</entry>
  382. <entry>The file '%value%' could not be found</entry>
  383. </row>
  384. <row>
  385. <entry>Float</entry>
  386. <entry>NOT_FLOAT</entry>
  387. <entry>'%value%' does not appear to be a float</entry>
  388. </row>
  389. <row>
  390. <entry>GreaterThan</entry>
  391. <entry>NOT_GREATER</entry>
  392. <entry>'%value%' is not greater than '%min%'</entry>
  393. </row>
  394. <row>
  395. <entry>Hex</entry>
  396. <entry>NOT_HEX</entry>
  397. <entry>'%value%' has not only hexadecimal digit characters</entry>
  398. </row>
  399. <row>
  400. <entry morerows="7" valign="middle">Hostname</entry>
  401. <entry>IP_ADDRESS_NOT_ALLOWED</entry>
  402. <entry>'%value%' appears to be an IP address, but IP addresses are not allowed</entry>
  403. </row>
  404. <row>
  405. <entry>UNKNOWN_TLD</entry>
  406. <entry>'%value%' appears to be a DNS hostname but cannot match TLD against known list</entry>
  407. </row>
  408. <row>
  409. <entry>INVALID_DASH</entry>
  410. <entry>'%value%' appears to be a DNS hostname but contains a dash (-) in an invalid position</entry>
  411. </row>
  412. <row>
  413. <entry>INVALID_HOSTNAME_SCHEMA</entry>
  414. <entry>'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'</entry>
  415. </row>
  416. <row>
  417. <entry>UNDECIPHERABLE_TLD</entry>
  418. <entry>'%value%' appears to be a DNS hostname but cannot extract TLD part</entry>
  419. </row>
  420. <row>
  421. <entry>INVALID_HOSTNAME</entry>
  422. <entry>'%value%' does not match the expected structure for a DNS hostname</entry>
  423. </row>
  424. <row>
  425. <entry>INVALID_LOCAL_NAME</entry>
  426. <entry>'%value%' does not appear to be a valid local network name</entry>
  427. </row>
  428. <row>
  429. <entry>LOCAL_NAME_NOT_ALLOWED</entry>
  430. <entry>'%value%' appears to be a local network name but local network names are not allowed</entry>
  431. </row>
  432. <row>
  433. <entry morerows="2" valign="middle">Iban</entry>
  434. <entry>NOTSUPPORTED</entry>
  435. <entry>'%value%' does not have IBAN</entry>
  436. </row>
  437. <row>
  438. <entry>FALSEFORMAT</entry>
  439. <entry>'%value%' has a false format</entry>
  440. </row>
  441. <row>
  442. <entry>CHECKFAILED</entry>
  443. <entry>'%value%' has failed the IBAN check</entry>
  444. </row>
  445. <row>
  446. <entry morerows="1" valign="middle">Identical</entry>
  447. <entry>NOT_SAME</entry>
  448. <entry>Tokens do not match</entry>
  449. </row>
  450. <row>
  451. <entry>MISSING_TOKEN</entry>
  452. <entry>No token was provided to match against</entry>
  453. </row>
  454. <row>
  455. <entry>InArray</entry>
  456. <entry>NOT_IN_ARRAY</entry>
  457. <entry>'%value%' was not found in the haystack</entry>
  458. </row>
  459. <row>
  460. <entry>Int</entry>
  461. <entry>NOT_INT</entry>
  462. <entry>'%value%' does not appear to be an integer</entry>
  463. </row>
  464. <row>
  465. <entry>Ip</entry>
  466. <entry>NOT_IP_ADDRESS</entry>
  467. <entry>'%value%' does not appear to be a valid IP address</entry>
  468. </row>
  469. <row>
  470. <entry>LessThan</entry>
  471. <entry>NOT_LESS</entry>
  472. <entry>'%value%' is not less than '%max%'</entry>
  473. </row>
  474. <row>
  475. <entry>NotEmpty</entry>
  476. <entry>IS_EMPTY</entry>
  477. <entry>Value is required and can't be empty</entry>
  478. </row>
  479. <row>
  480. <entry>Regex</entry>
  481. <entry>NOT_MATCH</entry>
  482. <entry>'%value%' does not match against pattern '%pattern%'</entry>
  483. </row>
  484. <row>
  485. <entry morerows="1" valign="middle">StringLength</entry>
  486. <entry>TOO_SHORT</entry>
  487. <entry>'%value%' is less than %min% characters long</entry>
  488. </row>
  489. <row>
  490. <entry>TOO_LONG</entry>
  491. <entry>'%value%' is greater than %max% characters long</entry>
  492. </row>
  493. </tbody>
  494. </tgroup>
  495. </table>
  496. <para>
  497. Zusätzlich kann man alle Meldungstemplates einer Prüfung mit der Methode
  498. <code>getMessageTemplates()</code> erhalten. Sie gibt ein Array mit den Meldungen zurück
  499. die eine Prüfung im Fall einer fehlgeschlagenen Prüfung zurückgeben könnte.
  500. </para>
  501. <programlisting role="php"><![CDATA[
  502. $validator = new Zend_Validate_Alnum();
  503. $messages = $validator->getMessageTemplates();
  504. ]]></programlisting>
  505. </sect1>
  506. <!--
  507. vim:se ts=4 sw=4 et:
  508. -->