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

/ajax/libs/jQuery-Validation-Engine/2.6.4/languages/jquery.validationEngine-ro.js

https://gitlab.com/Blueprint-Marketing/cdnjs
JavaScript | 177 lines | 160 code | 1 blank | 16 comment | 1 complexity | b32ec5dfa1c075eb938a728c7e6ff0fa 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": "* Camp obligatoriu",
  10. "alertTextCheckboxMultiple": "* Selecteaza o optiune",
  11. "alertTextCheckboxe": "* Optiune obligatorie",
  12. "alertTextDateRange": "* Campurile data cu ajutorul carora se stabileste perioada sunt obligatorii"
  13. },
  14. "requiredInFunction": {
  15. "func": function(field, rules, i, options){
  16. return (field.val() == "test") ? true : false;
  17. },
  18. "alertText": "* Field must equal test"
  19. },
  20. "dateRange": {
  21. "regex": "none",
  22. "alertText": "* Perioada ",
  23. "alertText2": "este invalida"
  24. },
  25. "dateTimeRange": {
  26. "regex": "none",
  27. "alertText": "* Intervalul de timp ",
  28. "alertText2": "este invalid"
  29. },
  30. "minSize": {
  31. "regex": "none",
  32. "alertText": "* Sunt permise cel putin ",
  33. "alertText2": " caractere"
  34. },
  35. "maxSize": {
  36. "regex": "none",
  37. "alertText": "* Sunt permise maxim ",
  38. "alertText2": " caractere"
  39. },
  40. "groupRequired": {
  41. "regex": "none",
  42. "alertText": "* Trebuie sa completezi unul dintre urmatoarele campuri"
  43. },
  44. "min": {
  45. "regex": "none",
  46. "alertText": "* Valoarea minim admisa este "
  47. },
  48. "max": {
  49. "regex": "none",
  50. "alertText": "* Valoarea maxim admisa este "
  51. },
  52. "past": {
  53. "regex": "none",
  54. "alertText": "* Data trebuie sa fie una anterioara fata de "
  55. },
  56. "future": {
  57. "regex": "none",
  58. "alertText": "* Data este una din trecut fata de "
  59. },
  60. "maxCheckbox": {
  61. "regex": "none",
  62. "alertText": "* Maximul de optiuni permise este ",
  63. "alertText2": ""
  64. },
  65. "minCheckbox": {
  66. "regex": "none",
  67. "alertText": "* Selecteaza minim ",
  68. "alertText2": " optiuni"
  69. },
  70. "equals": {
  71. "regex": "none",
  72. "alertText": "* Campurile nu au fost completate identic"
  73. },
  74. "creditCard": {
  75. "regex": "none",
  76. "alertText": "* Nevalid num?rul de card de credit"
  77. },
  78. "phone": {
  79. // credit: jquery.h5validate.js / orefalo
  80. "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
  81. "alertText": "* Numarul de telefon este scris eronat"
  82. },
  83. "email": {
  84. // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
  85. "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,
  86. "alertText": "* Adresa e-mail este scrisa gresit"
  87. },
  88. "integer": {
  89. "regex": /^[\-\+]?\d+$/,
  90. "alertText": "* Nu este un numar intreg"
  91. },
  92. "number": {
  93. // Number, including positive, negative, and floating decimal. credit: orefalo
  94. "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
  95. "alertText": "* Trebuie sa fie un numar"
  96. },
  97. "date": {
  98. "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
  99. "alertText": "* Data nu este corecta. Aceasta trebuie sa fie scrisa sub forma YYYY-MM-DD"
  100. },
  101. "ipv4": {
  102. "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]))$/,
  103. "alertText": "* Adresa IP nu este corecta"
  104. },
  105. "url": {
  106. "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,
  107. "alertText": "* URL gresit"
  108. },
  109. "onlyNumberSp": {
  110. "regex": /^[0-9\ ]+$/,
  111. "alertText": "* Sunt permise doar numerele"
  112. },
  113. "onlyLetterSp": {
  114. "regex": /^[a-zA-Z\ \']+$/,
  115. "alertText": "* Sunt admise doar literele"
  116. },
  117. "onlyLetterNumber": {
  118. "regex": /^[0-9a-zA-Z]+$/,
  119. "alertText": "* Trebuie sa folosesti doar litere si numere intregi"
  120. },
  121. // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
  122. "ajaxUserCall": {
  123. "url": "ajaxValidateFieldUser",
  124. // you may want to pass extra data on the ajax call
  125. "extraData": "name=eric",
  126. "alertText": "* Numele utilizator nu este disponibil",
  127. "alertTextLoad": "* Se efectueaza validarea. Asteapta..."
  128. },
  129. "ajaxUserCallPhp": {
  130. "url": "phpajax/ajaxValidateFieldUser.php",
  131. // you may want to pass extra data on the ajax call
  132. "extraData": "name=eric",
  133. // if you provide an "alertTextOk", it will show as a green prompt when the field validates
  134. "alertTextOk": "* Numele utilizator este disponibil",
  135. "alertText": "* Numele utilizator nu este disponibil",
  136. "alertTextLoad": "* Se efectueaza validarea. Asteapta..."
  137. },
  138. "ajaxNameCall": {
  139. // remote json service location
  140. "url": "ajaxValidateFieldName",
  141. // error
  142. "alertText": "* Numele nu este disponibil",
  143. // if you provide an "alertTextOk", it will show as a green prompt when the field validates
  144. "alertTextOk": "* Numele este disponibil",
  145. // speaks by itself
  146. "alertTextLoad": "* Se efectueaza validarea. Asteapta..."
  147. },
  148. "ajaxNameCallPhp": {
  149. // remote json service location
  150. "url": "phpajax/ajaxValidateFieldName.php",
  151. // error
  152. "alertText": "* Numele nu este disponibil",
  153. // speaks by itself
  154. "alertTextLoad": "* Se efectueaza validarea. Asteapta..."
  155. },
  156. "validate2fields": {
  157. "alertText": "* Scrie: HELLO"
  158. },
  159. //tls warning:homegrown not fielded
  160. "dateFormat":{
  161. "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,
  162. "alertText": "* Data nu este corecta"
  163. },
  164. //tls warning:homegrown not fielded
  165. "dateTimeFormat": {
  166. "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,
  167. "alertText": "* Data nu este corecta sau formatul acesteia este unul gresit",
  168. "alertText2": "Formatele recunoscute sunt: ",
  169. "alertText3": "mm/dd/yyyy hh:mm:ss AM|PM sau ",
  170. "alertText4": "yyyy-mm-dd hh:mm:ss AM|PM"
  171. }
  172. };
  173. }
  174. };
  175. $.validationEngineLanguage.newLang();
  176. })(jQuery);