PageRenderTime 39ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/wp-content/plugins/wysija-newsletters/js/validate/languages/jquery.validationEngine-nl.js

https://gitlab.com/Gashler/sg
JavaScript | 137 lines | 125 code | 1 blank | 11 comment | 1 complexity | 88af2ebb294d0855640a3ddd6f1531e5 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": "geen",
  9. "alertText": "* Dit veld is verplicht",
  10. "alertTextCheckboxMultiple": "* Selecteer a.u.b. een optie",
  11. "alertTextCheckboxe": "* Dit selectievakje is verplicht"
  12. },
  13. "requiredInFunction": {
  14. "func": function(field, rules, i, options){
  15. return (field.val() == "test") ? true : false;
  16. },
  17. "alertText": "* Velden moeten gelijk zijn"
  18. },
  19. "minSize": {
  20. "regex": "none",
  21. "alertText": "* Minimaal ",
  22. "alertText2": " karakters toegestaan"
  23. },
  24. "maxSize": {
  25. "regex": "none",
  26. "alertText": "* Maximaal ",
  27. "alertText2": " karakters toegestaan"
  28. },
  29. "groupRequired": {
  30. "regex": "none",
  31. "alertText": "* Vul één van de volgende velden in"
  32. },
  33. "min": {
  34. "regex": "none",
  35. "alertText": "* Minimale waarde is "
  36. },
  37. "max": {
  38. "regex": "none",
  39. "alertText": "* Maximale waarde is "
  40. },
  41. "past": {
  42. "regex": "none",
  43. "alertText": "* Datum voorafgaand aan "
  44. },
  45. "future": {
  46. "regex": "none",
  47. "alertText": "* Datum na "
  48. },
  49. "maxCheckbox": {
  50. "regex": "none",
  51. "alertText": "* Toegestane aantal vinkjes overschreden"
  52. },
  53. "minCheckbox": {
  54. "regex": "none",
  55. "alertText": "* Selecteer a.u.b. ",
  56. "alertText2": " opties"
  57. },
  58. "equals": {
  59. "regex": "none",
  60. "alertText": "* Velden komen niet overeen"
  61. },
  62. "creditCard": {
  63. "regex": "none",
  64. "alertText": "* Ongeldige credit card nummer"
  65. },
  66. "phone": {
  67. // credit: jquery.h5validate.js / orefalo
  68. "regex": /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/,
  69. "alertText": "* Ongeldig telefoonnummer"
  70. },
  71. "email": {
  72. // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
  73. // Replaced incredible long regex with shorter and working one! :)
  74. // "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,
  75. "regex": /^[a-z0-9]+[a-z0-9._%+-]*@(?:[a-z0-9-]+\.)+[a-z]{2,6}$/i,
  76. "alertText": "* Ongeldig emailadres"
  77. },
  78. "integer": {
  79. "regex": /^[\-\+]?\d+$/,
  80. "alertText": "* Ongeldig geheel getal"
  81. },
  82. "number": {
  83. // Number, including positive, negative, and floating decimal. credit: orefalo
  84. "regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
  85. "alertText": "* Ongeldig komma getal"
  86. },
  87. "date": {
  88. "regex": /^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/,
  89. "alertText": "* Ongeldige datum, formaat moet DD-MM-JJJJ zijn"
  90. },
  91. "ipv4": {
  92. "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]))$/,
  93. "alertText": "* Ongeldig IP-adres"
  94. },
  95. "url": {
  96. "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,
  97. "alertText": "* Ongeldige URL"
  98. },
  99. "onlyNumberSp": {
  100. "regex": /^[0-9\ ]+$/,
  101. "alertText": "* Alleen cijfers"
  102. },
  103. "onlyLetterSp": {
  104. "regex": /^[a-zA-Z\ \']+$/,
  105. "alertText": "* Alleen leestekens"
  106. },
  107. "onlyLetterNumber": {
  108. "regex": /^[0-9a-zA-Z]+$/,
  109. "alertText": "* Geen vreemde tekens toegestaan"
  110. },
  111. // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
  112. "ajaxUserCall": {
  113. "url": "ajaxValidateFieldUser",
  114. // you may want to pass extra data on the ajax call
  115. "extraData": "name=eric",
  116. "alertText": "* Deze gebruiker bestaat al",
  117. "alertTextLoad": "* Bezig met valideren, even geduld aub"
  118. },
  119. "ajaxNameCall": {
  120. // remote json service location
  121. "url": "ajaxValidateFieldName",
  122. // error
  123. "alertText": "* Deze naam bestaat al",
  124. // if you provide an "alertTextOk", it will show as a green prompt when the field validates
  125. "alertTextOk": "* Deze naam is beschikbaar",
  126. // speaks by itself
  127. "alertTextLoad": "* Bezig met valideren, even geduld aub"
  128. },
  129. "validate2fields": {
  130. "alertText": "* Voer aub HELLO in"
  131. }
  132. };
  133. }
  134. };
  135. $.validationEngineLanguage.newLang();
  136. })(jQuery);