PageRenderTime 58ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://gitlab.com/Mirros/jsdelivr
JavaScript | 130 lines | 119 code | 1 blank | 10 comment | 0 complexity | 07edf4d3bbc88cf3872863275571f3ec 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": "* Pole wymagane",
  10. "alertTextCheckboxMultiple": "* Proszę wybrać opcję",
  11. "alertTextCheckboxe": "* Pole wymagane"
  12. },
  13. "minSize": {
  14. "regex": "none",
  15. "alertText": "* Minimalna liczba znaków to ",
  16. "alertText2": ""
  17. },
  18. "maxSize": {
  19. "regex": "none",
  20. "alertText": "* Maksymalna liczba znaków to ",
  21. "alertText2": ""
  22. },
  23. "groupRequired": {
  24. "regex": "none",
  25. "alertText": "* You must fill one of the following fields"
  26. },
  27. "min": {
  28. "regex": "none",
  29. "alertText": "* Najmniejsza wartość to "
  30. },
  31. "max": {
  32. "regex": "none",
  33. "alertText": "* Największa wartość to "
  34. },
  35. "past": {
  36. "regex": "none",
  37. "alertText": "* Data musi być wcześniejsza niż "
  38. },
  39. "future": {
  40. "regex": "none",
  41. "alertText": "* Data musi być późniejsza niż "
  42. },
  43. "maxCheckbox": {
  44. "regex": "none",
  45. "alertText": "* Przekroczona maksymalna liczba opcji"
  46. },
  47. "minCheckbox": {
  48. "regex": "none",
  49. "alertText": "* Minimalna liczba opcji to ",
  50. "alertText2": ""
  51. },
  52. "equals": {
  53. "regex": "none",
  54. "alertText": "* Pola nie są jednakowe"
  55. },
  56. "phone": {
  57. // credit: jquery.h5validate.js / orefalo
  58. "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
  59. "alertText": "* Nieprawidłowy numer telefonu"
  60. },
  61. "email": {
  62. // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
  63. "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,
  64. "alertText": "* Nieprawidłowy adres e-mail"
  65. },
  66. "integer": {
  67. "regex": /^[\-\+]?\d+$/,
  68. "alertText": "* Nieprawidłowa liczba całkowita"
  69. },
  70. "number": {
  71. // Number, including positive, negative, and floating decimal. credit: orefalo
  72. "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
  73. "alertText": "* Nieprawidłowa liczba dziesiętna"
  74. },
  75. "CZdate": {
  76. // Date in Polish format, regex taken from Czech translation
  77. "regex": /^(0[1-9]|[12][0-9]|3[01])[. /.](0[1-9]|1[012])[. /.](19|20)\d{2}$/,
  78. "alertText": "* Data musi być w postaci DD.MM.RRRR"
  79. },
  80. "date": {
  81. "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
  82. "alertText": "* Data musi być w postaci RRRR-MM-DD"
  83. },
  84. "ipv4": {
  85. "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]))$/,
  86. "alertText": "* Nieprawidłowy adres IP"
  87. },
  88. "url": {
  89. "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,
  90. "alertText": "* Nieprawidłowy adres internetowy"
  91. },
  92. "onlyNumberSp": {
  93. "regex": /^[0-9\ ]+$/,
  94. "alertText": "* Tylko liczby"
  95. },
  96. "onlyLetterSp": {
  97. "regex": /^[a-zA-Z\ \']+$/,
  98. "alertText": "* Tylko litery"
  99. },
  100. "onlyLetterNumber": {
  101. "regex": /^[0-9a-zA-Z]+$/,
  102. "alertText": "* Tylko litery i liczby"
  103. },
  104. // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
  105. "ajaxUserCall": {
  106. "url": "ajaxValidateFieldUser",
  107. // you may want to pass extra data on the ajax call
  108. "extraData": "name=eric",
  109. "alertText": "* Nazwa użytkownika jest już zajęta",
  110. "alertTextLoad": "* Walidacja, proszę czekać"
  111. },
  112. "ajaxNameCall": {
  113. // remote json service location
  114. "url": "ajaxValidateFieldName",
  115. // error
  116. "alertText": "* Nazwa jest już zajęta",
  117. // if you provide an "alertTextOk", it will show as a green prompt when the field validates
  118. "alertTextOk": "* Nazwa jest dostępna",
  119. // speaks by itself
  120. "alertTextLoad": "* Walidacja, proszę czekać"
  121. },
  122. "validate2fields": {
  123. "alertText": "* Proszę wpisać HELLO"
  124. }
  125. };
  126. }
  127. };
  128. $.validationEngineLanguage.newLang();
  129. })(jQuery);