Zend_Validate-Messages.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- EN-Revision: 16087 -->
  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">Db_Abstract</entry>
  102. <entry>ERROR_NO_RECORD_FOUND</entry>
  103. <entry>No record matching %value% was found</entry>
  104. </row>
  105. <row>
  106. <entry>ERROR_RECORD_FOUND</entry>
  107. <entry>A record matching %value% was found</entry>
  108. </row>
  109. <row>
  110. <entry morerows="1" valign="middle">Digits</entry>
  111. <entry>NOT_DIGITS</entry>
  112. <entry>'%value%' contains not only digit characters</entry>
  113. </row>
  114. <row>
  115. <entry>STRING_EMPTY</entry>
  116. <entry>'%value%' is an empty string</entry>
  117. </row>
  118. <row>
  119. <entry morerows="6" valign="middle">EmailAddress</entry>
  120. <entry>INVALID</entry>
  121. <entry>
  122. '%value%' is not a valid email address in the basic format
  123. local-part@hostname
  124. </entry>
  125. </row>
  126. <row>
  127. <entry>INVALID_HOSTNAME</entry>
  128. <entry>'%hostname%' is not a valid hostname for email address '%value%'</entry>
  129. </row>
  130. <row>
  131. <entry>INVALID_MX_RECORD</entry>
  132. <entry>
  133. '%hostname%' does not appear to have a valid MX record for the email address
  134. '%value%'
  135. </entry>
  136. </row>
  137. <row>
  138. <entry>DOT_ATOM</entry>
  139. <entry>'%localPart%' not matched against dot-atom format</entry>
  140. </row>
  141. <row>
  142. <entry>QUOTED_STRING</entry>
  143. <entry>'%localPart%' not matched against quoted-string format</entry>
  144. </row>
  145. <row>
  146. <entry>INVALID_LOCAL_PART</entry>
  147. <entry>
  148. '%localPart%' is not a valid local part for email address '%value%'
  149. </entry>
  150. </row>
  151. <row>
  152. <entry>LENGTH_EXCEEDED</entry>
  153. <entry>'%value%' exceeds the allowed length</entry>
  154. </row>
  155. <row>
  156. <entry morerows="1" valign="middle">File_Count</entry>
  157. <entry>TOO_MUCH</entry>
  158. <entry>
  159. Too much files, maximum '%max%' are allowed but '%count%' are given
  160. </entry>
  161. </row>
  162. <row>
  163. <entry>TOO_LESS</entry>
  164. <entry>
  165. Too less files, minimum '%min%' are expected but '%count%' are given
  166. </entry>
  167. </row>
  168. <row>
  169. <entry morerows="2" valign="middle">File_Crc32</entry>
  170. <entry>DOES_NOT_MATCH</entry>
  171. <entry>The file '%value%' does not match the given crc32 hashes</entry>
  172. </row>
  173. <row>
  174. <entry>NOT_DETECTED</entry>
  175. <entry>There was no crc32 hash detected for the given file</entry>
  176. </row>
  177. <row>
  178. <entry>NOT_FOUND</entry>
  179. <entry>The file '%value%' could not be found</entry>
  180. </row>
  181. <row>
  182. <entry morerows="1" valign="middle">File_ExcludeExtension</entry>
  183. <entry>FALSE_EXTENSION</entry>
  184. <entry>The file '%value%' has a false extension</entry>
  185. </row>
  186. <row>
  187. <entry>NOT_FOUND</entry>
  188. <entry>The file '%value%' was not found</entry>
  189. </row>
  190. <row>
  191. <entry morerows="2" valign="middle">File_ExcludeMimeType</entry>
  192. <entry>FALSE_TYPE</entry>
  193. <entry>The file '%value%' has a false mimetype of '%type%'</entry>
  194. </row>
  195. <row>
  196. <entry>NOT_DETECTED</entry>
  197. <entry>The mimetype of file '%value%' could not been detected</entry>
  198. </row>
  199. <row>
  200. <entry>NOT_READABLE</entry>
  201. <entry>The file '%value%' can not be read</entry>
  202. </row>
  203. <row>
  204. <entry morerows="2" valign="middle">File_Exists</entry>
  205. <entry>DOES_NOT_EXIST</entry>
  206. <entry>The file '%value%' does not exist</entry>
  207. </row>
  208. <row>
  209. <entry morerows="1" valign="middle">File_Extension</entry>
  210. <entry>FALSE_EXTENSION</entry>
  211. <entry>The file '%value%' has a false extension</entry>
  212. </row>
  213. <row>
  214. <entry>NOT_FOUND</entry>
  215. <entry>The file '%value%' was not found</entry>
  216. </row>
  217. <row>
  218. <entry morerows="2" valign="middle">File_FilesSize</entry>
  219. <entry>TOO_BIG</entry>
  220. <entry>
  221. All files in sum should have a maximum size of '%max%' but '%size%' were
  222. detected
  223. </entry>
  224. </row>
  225. <row>
  226. <entry>TOO_SMALL</entry>
  227. <entry>
  228. All files in sum should have a minimum size of '%min%' but '%size%' were
  229. detected
  230. </entry>
  231. </row>
  232. <row>
  233. <entry>NOT_READABLE</entry>
  234. <entry>One or more files can not be read</entry>
  235. </row>
  236. <row>
  237. <entry morerows="2" valign="middle">File_Hash</entry>
  238. <entry>DOES_NOT_MATCH</entry>
  239. <entry>The file '%value%' does not match the given hashes</entry>
  240. </row>
  241. <row>
  242. <entry>NOT_DETECTED</entry>
  243. <entry>There was no hash detected for the given file</entry>
  244. </row>
  245. <row>
  246. <entry>NOT_FOUND</entry>
  247. <entry>The file '%value%' could not be found</entry>
  248. </row>
  249. <row>
  250. <entry morerows="5" valign="middle">File_ImageSize</entry>
  251. <entry>WIDTH_TOO_BIG</entry>
  252. <entry>
  253. Maximum allowed width for image '%value%' should be '%maxwidth%' but
  254. '%width%' detected
  255. </entry>
  256. </row>
  257. <row>
  258. <entry>WIDTH_TOO_SMALL</entry>
  259. <entry>
  260. Minimum expected width for image '%value%' should be '%minwidth%' but
  261. '%width%' detected
  262. </entry>
  263. </row>
  264. <row>
  265. <entry>HEIGHT_TOO_BIG</entry>
  266. <entry>
  267. Maximum allowed height for image '%value%' should be '%maxheight%' but
  268. '%height%' detected
  269. </entry>
  270. </row>
  271. <row>
  272. <entry>HEIGHT_TOO_SMALL</entry>
  273. <entry>
  274. Minimum expected height for image '%value%' should be '%minheight%' but
  275. '%height%' detected
  276. </entry>
  277. </row>
  278. <row>
  279. <entry>NOT_DETECTED</entry>
  280. <entry>The size of image '%value%' could not be detected</entry>
  281. </row>
  282. <row>
  283. <entry>NOT_READABLE</entry>
  284. <entry>The image '%value%' can not be read</entry>
  285. </row>
  286. <row>
  287. <entry morerows="2" valign="middle">File_IsCompressed</entry>
  288. <entry>FALSE_TYPE</entry>
  289. <entry>The file '%value%' is not compressed, '%type%' detected</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 morerows="2" valign="middle">File_IsImage</entry>
  301. <entry>FALSE_TYPE</entry>
  302. <entry>The file '%value%' is no image, '%type%' detected</entry>
  303. </row>
  304. <row>
  305. <entry>NOT_DETECTED</entry>
  306. <entry>The mimetype of file '%value%' could not been detected</entry>
  307. </row>
  308. <row>
  309. <entry>NOT_READABLE</entry>
  310. <entry>The file '%value%' can not be read</entry>
  311. </row>
  312. <row>
  313. <entry morerows="2" valign="middle">File_Md5</entry>
  314. <entry>DOES_NOT_MATCH</entry>
  315. <entry>The file '%value%' does not match the given md5 hashes</entry>
  316. </row>
  317. <row>
  318. <entry>NOT_DETECTED</entry>
  319. <entry>There was no md5 hash detected for the given file</entry>
  320. </row>
  321. <row>
  322. <entry>NOT_FOUND</entry>
  323. <entry>The file '%value%' could not be found</entry>
  324. </row>
  325. <row>
  326. <entry morerows="2" valign="middle">File_MimeType</entry>
  327. <entry>FALSE_TYPE</entry>
  328. <entry>The file '%value%' has a false mimetype of '%type%'</entry>
  329. </row>
  330. <row>
  331. <entry>NOT_DETECTED</entry>
  332. <entry>The mimetype of file '%value%' could not been detected</entry>
  333. </row>
  334. <row>
  335. <entry>NOT_READABLE</entry>
  336. <entry>The file '%value%' can not be read</entry>
  337. </row>
  338. <row>
  339. <entry>File_NotExists</entry>
  340. <entry>DOES_EXIST</entry>
  341. <entry>The file '%value%' does exist</entry>
  342. </row>
  343. <row>
  344. <entry morerows="2" valign="middle">File_Sha1</entry>
  345. <entry>DOES_NOT_MATCH</entry>
  346. <entry>The file '%value%' does not match the given sha1 hashes</entry>
  347. </row>
  348. <row>
  349. <entry>NOT_DETECTED</entry>
  350. <entry>There was no sha1 hash detected for the given file</entry>
  351. </row>
  352. <row>
  353. <entry>NOT_FOUND</entry>
  354. <entry>The file '%value%' could not be found</entry>
  355. </row>
  356. <row>
  357. <entry morerows="2" valign="middle">File_Size</entry>
  358. <entry>TOO_BIG</entry>
  359. <entry>
  360. Maximum allowed size for file '%value%' is '%max%' but '%size%' detected
  361. </entry>
  362. </row>
  363. <row>
  364. <entry>TOO_SMALL</entry>
  365. <entry>
  366. Minimum expected size for file '%value%' is '%min%' but '%size%' detected
  367. </entry>
  368. </row>
  369. <row>
  370. <entry>NOT_FOUND</entry>
  371. <entry>The file '%value%' could not be found</entry>
  372. </row>
  373. <row>
  374. <entry morerows="9" valign="middle">File_Upload</entry>
  375. <entry>INI_SIZE</entry>
  376. <entry>The file '%value%' exceeds the defined ini size</entry>
  377. </row>
  378. <row>
  379. <entry>FORM_SIZE</entry>
  380. <entry>The file '%value%' exceeds the defined form size</entry>
  381. </row>
  382. <row>
  383. <entry>PARTIAL</entry>
  384. <entry>The file '%value%' was only partially uploaded</entry>
  385. </row>
  386. <row>
  387. <entry>NO_FILE</entry>
  388. <entry>The file '%value%' was not uploaded</entry>
  389. </row>
  390. <row>
  391. <entry>NO_TMP_DIR</entry>
  392. <entry>No temporary directory was found for the file '%value%'</entry>
  393. </row>
  394. <row>
  395. <entry>CANT_WRITE</entry>
  396. <entry>The file '%value%' can't be written</entry>
  397. </row>
  398. <row>
  399. <entry>EXTENSION</entry>
  400. <entry>
  401. The extension returned an error while uploading the file '%value%'
  402. </entry>
  403. </row>
  404. <row>
  405. <entry>ATTACK</entry>
  406. <entry>The file '%value%' was illegal uploaded, possible attack</entry>
  407. </row>
  408. <row>
  409. <entry>FILE_NOT_FOUND</entry>
  410. <entry>The file '%value%' was not found</entry>
  411. </row>
  412. <row>
  413. <entry>UNKNOWN</entry>
  414. <entry>Unknown error while uploading the file '%value%'</entry>
  415. </row>
  416. <row>
  417. <entry morerows="2" valign="middle">File_WordCount</entry>
  418. <entry>TOO_MUCH</entry>
  419. <entry>
  420. Too much words, maximum '%max%' are allowed but '%count%' were counted
  421. </entry>
  422. </row>
  423. <row>
  424. <entry>TOO_LESS</entry>
  425. <entry>
  426. Too less words, minimum '%min%' are expected but '%count%' were counted
  427. </entry>
  428. </row>
  429. <row>
  430. <entry>NOT_FOUND</entry>
  431. <entry>The file '%value%' could not be found</entry>
  432. </row>
  433. <row>
  434. <entry>Float</entry>
  435. <entry>NOT_FLOAT</entry>
  436. <entry>'%value%' does not appear to be a float</entry>
  437. </row>
  438. <row>
  439. <entry>GreaterThan</entry>
  440. <entry>NOT_GREATER</entry>
  441. <entry>'%value%' is not greater than '%min%'</entry>
  442. </row>
  443. <row>
  444. <entry>Hex</entry>
  445. <entry>NOT_HEX</entry>
  446. <entry>'%value%' has not only hexadecimal digit characters</entry>
  447. </row>
  448. <row>
  449. <entry morerows="7" valign="middle">Hostname</entry>
  450. <entry>IP_ADDRESS_NOT_ALLOWED</entry>
  451. <entry>
  452. '%value%' appears to be an IP address, but IP addresses are not allowed
  453. </entry>
  454. </row>
  455. <row>
  456. <entry>UNKNOWN_TLD</entry>
  457. <entry>
  458. '%value%' appears to be a DNS hostname but cannot match TLD against known
  459. list
  460. </entry>
  461. </row>
  462. <row>
  463. <entry>INVALID_DASH</entry>
  464. <entry>
  465. '%value%' appears to be a DNS hostname but contains a dash (-) in an invalid
  466. position
  467. </entry>
  468. </row>
  469. <row>
  470. <entry>INVALID_HOSTNAME_SCHEMA</entry>
  471. <entry>
  472. '%value%' appears to be a DNS hostname but cannot match against hostname
  473. schema for TLD '%tld%'
  474. </entry>
  475. </row>
  476. <row>
  477. <entry>UNDECIPHERABLE_TLD</entry>
  478. <entry>
  479. '%value%' appears to be a DNS hostname but cannot extract TLD part
  480. </entry>
  481. </row>
  482. <row>
  483. <entry>INVALID_HOSTNAME</entry>
  484. <entry>
  485. '%value%' does not match the expected structure for a DNS hostname
  486. </entry>
  487. </row>
  488. <row>
  489. <entry>INVALID_LOCAL_NAME</entry>
  490. <entry>'%value%' does not appear to be a valid local network name</entry>
  491. </row>
  492. <row>
  493. <entry>LOCAL_NAME_NOT_ALLOWED</entry>
  494. <entry>
  495. '%value%' appears to be a local network name but local network names are not
  496. allowed
  497. </entry>
  498. </row>
  499. <row>
  500. <entry morerows="2" valign="middle">Iban</entry>
  501. <entry>NOTSUPPORTED</entry>
  502. <entry>'%value%' does not have IBAN</entry>
  503. </row>
  504. <row>
  505. <entry>FALSEFORMAT</entry>
  506. <entry>'%value%' has a false format</entry>
  507. </row>
  508. <row>
  509. <entry>CHECKFAILED</entry>
  510. <entry>'%value%' has failed the IBAN check</entry>
  511. </row>
  512. <row>
  513. <entry morerows="1" valign="middle">Identical</entry>
  514. <entry>NOT_SAME</entry>
  515. <entry>The token '%token%' does not match the given token '%value%'</entry>
  516. </row>
  517. <row>
  518. <entry>MISSING_TOKEN</entry>
  519. <entry>No token was provided to match against</entry>
  520. </row>
  521. <row>
  522. <entry>InArray</entry>
  523. <entry>NOT_IN_ARRAY</entry>
  524. <entry>'%value%' was not found in the haystack</entry>
  525. </row>
  526. <row>
  527. <entry>Int</entry>
  528. <entry>NOT_INT</entry>
  529. <entry>'%value%' does not appear to be an integer</entry>
  530. </row>
  531. <row>
  532. <entry>Ip</entry>
  533. <entry>NOT_IP_ADDRESS</entry>
  534. <entry>'%value%' does not appear to be a valid IP address</entry>
  535. </row>
  536. <row>
  537. <entry>LessThan</entry>
  538. <entry>NOT_LESS</entry>
  539. <entry>'%value%' is not less than '%max%'</entry>
  540. </row>
  541. <row>
  542. <entry>NotEmpty</entry>
  543. <entry>IS_EMPTY</entry>
  544. <entry>Value is required and can't be empty</entry>
  545. </row>
  546. <row>
  547. <entry>Regex</entry>
  548. <entry>NOT_MATCH</entry>
  549. <entry>'%value%' does not match against pattern '%pattern%'</entry>
  550. </row>
  551. <row>
  552. <entry morerows="1" valign="middle">StringLength</entry>
  553. <entry>TOO_SHORT</entry>
  554. <entry>'%value%' is less than %min% characters long</entry>
  555. </row>
  556. <row>
  557. <entry>TOO_LONG</entry>
  558. <entry>'%value%' is greater than %max% characters long</entry>
  559. </row>
  560. </tbody>
  561. </tgroup>
  562. </table>
  563. <para>
  564. Zusätzlich kann man alle Meldungstemplates einer Prüfung mit der Methode
  565. <code>getMessageTemplates()</code> erhalten. Sie gibt ein Array mit den Meldungen zurück
  566. die eine Prüfung im Fall einer fehlgeschlagenen Prüfung zurückgeben könnte.
  567. </para>
  568. <programlisting language="php"><![CDATA[
  569. $validator = new Zend_Validate_Alnum();
  570. $messages = $validator->getMessageTemplates();
  571. ]]></programlisting>
  572. </sect1>
  573. <!--
  574. vim:se ts=4 sw=4 et:
  575. -->