PageRenderTime 26ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/files/validation.engine/2.2.4/languages/jquery.validationEngine-cz.js

https://gitlab.com/Mirros/jsdelivr
JavaScript | 146 lines | 131 code | 1 blank | 14 comment | 0 complexity | 195348cd8685639d41c7a2531710993b MD5 | raw file
  1. (function($){
  2. $.fn.validationEngineLanguage = function(){
  3. };
  4. $.validationEngineLanguage = {
  5. newLang: function(){
  6. $.validationEngineLanguage.allRules = {
  7. "required": { // Add your regex rules here, you can take telephone as an example
  8. "regex": "none",
  9. "alertText": "* Tato položka je povinná",
  10. "alertTextCheckboxMultiple": "* Prosím vyberte jednu možnost",
  11. "alertTextCheckboxe": "* Tato položka je povinná"
  12. },
  13. "minSize": {
  14. "regex": "none",
  15. "alertText": "* Minimálně ",
  16. "alertText2": " znaky"
  17. },
  18. "maxSize": {
  19. "regex": "none",
  20. "alertText": "* Maximálně ",
  21. "alertText2": " znaky"
  22. },
  23. "groupRequired": {
  24. "regex": "none",
  25. "alertText": "* You must fill one of the following fields"
  26. },
  27. "min": {
  28. "regex": "none",
  29. "alertText": "* Minimální hodnota je "
  30. },
  31. "max": {
  32. "regex": "none",
  33. "alertText": "* Maximální hodnota je "
  34. },
  35. "past": {
  36. "regex": "none",
  37. "alertText": "* Date prior to "
  38. },
  39. "future": {
  40. "regex": "none",
  41. "alertText": "* Date past "
  42. },
  43. "maxCheckbox": {
  44. "regex": "none",
  45. "alertText": "* Počet vybraných položek přesáhl limit"
  46. },
  47. "minCheckbox": {
  48. "regex": "none",
  49. "alertText": "* Prosím vyberte ",
  50. "alertText2": " volbu"
  51. },
  52. "equals": {
  53. "regex": "none",
  54. "alertText": "* Pole se neshodují"
  55. },
  56. "CZphone": {
  57. // telefoní číslo
  58. "regex": /^([\+][0-9]{1,3}[ \.\-])([0-9]{3}[\-][0-9]{3}[\-][0-9]{3})$/,
  59. "alertText": "* Neplatné telefoní číslo, zadejte ve formátu +420 598-598-895"
  60. },
  61. "phone": {
  62. // credit: jquery.h5validate.js / orefalo
  63. "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
  64. "alertText": "* Invalid phone number"
  65. },
  66. "email": {
  67. // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
  68. "regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
  69. "alertText": "* Neplatná emailová adresa"
  70. },
  71. "integer": {
  72. "regex": /^[\-\+]?\d+$/,
  73. "alertText": "* Zadejte pouze čísla"
  74. },
  75. "number": {
  76. // Number, including positive, negative, and floating decimal. credit: orefalo
  77. "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
  78. "alertText": "* Neplatné číslo"
  79. },
  80. "CZdate": {
  81. // datum ve formátu jak se používá v čr
  82. "regex": /^(0[1-9]|[12][0-9]|3[01])[. /.](0[1-9]|1[012])[. /.](19|20)\d{2}$/,
  83. "alertText": "* Neplatné datum, datum musí být ve formátu den.měsíc.rok (dd.mm.rrrr)"
  84. },
  85. "date": {
  86. // Date in ISO format. Credit: bassistance
  87. "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
  88. "alertText": "* Neplatné datum, datum musí být ve formátu YYYY-MM-DD"
  89. },
  90. "ipv4": {
  91. "regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
  92. "alertText": "* Neplatná IP adresa"
  93. },
  94. //česká syntaxe pro rodné číslo
  95. "rc": {
  96. "regex": /^\d{2}((0[1-9]|1[012])|(5[1-9]|6[012]))(0[1-9]|[12][0-9]|3[01])\/([0-9]{2,4})$/,
  97. "alertText": "* Neplatné rodné číslo, tvar musí být 895431/4567"
  98. },
  99. //poštovní směrovací číslo
  100. "psc": {
  101. "regex": /^\d{3}[ \.\-]\d{2}$/,
  102. "alertText": "* Neplatné poštovní směrovací číslo, tvar musí být 456 45"
  103. },
  104. "url": {
  105. "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
  106. "alertText": "* Neplatný odkaz"
  107. },
  108. "onlyNumberSp": {
  109. "regex": /^[0-9\ ]+$/,
  110. "alertText": "* Pouze čísla"
  111. },
  112. "onlyLetterSp": {
  113. "regex": /^[a-zA-Z\ \']+$/,
  114. "alertText": "* Pouze písmena"
  115. },
  116. "onlyLetterNumber": {
  117. "regex": /^[0-9a-zA-Z]+$/,
  118. "alertText": "* Pouze písmena a číslice"
  119. },
  120. // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
  121. "ajaxUserCall": {
  122. "url": "ajaxValidateFieldUser",
  123. // you may want to pass extra data on the ajax call
  124. "extraData": "name=eric",
  125. "alertText": "* Uživatelské jméno je již použito",
  126. "alertTextLoad": "* Ověřování, prosím čekejte"
  127. },
  128. "ajaxNameCall": {
  129. // remote json service location
  130. "url": "ajaxValidateFieldName",
  131. // error
  132. "alertText": "* Uživatelské jméno je již použito",
  133. // if you provide an "alertTextOk", it will show as a green prompt when the field validates
  134. "alertTextOk": "* Toto jméno je k dispozici",
  135. // speaks by itself
  136. "alertTextLoad": "* Ověřování, prosím čekejte"
  137. },
  138. "validate2fields": {
  139. "alertText": "* Prosím napište HELLO"
  140. }
  141. };
  142. }
  143. };
  144. $.validationEngineLanguage.newLang();
  145. })(jQuery);