PageRenderTime 32ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/files/validation.engine/2.5.5.1/languages/jquery.validationEngine-fr.js

https://gitlab.com/Mirros/jsdelivr
JavaScript | 129 lines | 125 code | 0 blank | 4 comment | 1 complexity | d73b21f1c534f4376be19c7ea542e518 MD5 | raw file
  1. (function($){
  2. $.fn.validationEngineLanguage = function(){
  3. };
  4. $.validationEngineLanguage = {
  5. newLang: function(){
  6. $.validationEngineLanguage.allRules = {
  7. "required": {
  8. "regex": "none",
  9. "alertText": "* Ce champ est requis",
  10. "alertTextCheckboxMultiple": "* Choisir une option",
  11. "alertTextCheckboxe": "* Cette option est requise"
  12. },
  13. "requiredInFunction": {
  14. "func": function(field, rules, i, options){
  15. return (field.val() == "test") ? true : false;
  16. },
  17. "alertText": "* Field must equal test"
  18. },
  19. "minSize": {
  20. "regex": "none",
  21. "alertText": "* Minimum ",
  22. "alertText2": " caractères requis"
  23. },
  24. "groupRequired": {
  25. "regex": "none",
  26. "alertText": "* Vous devez remplir un des champs suivant"
  27. },
  28. "maxSize": {
  29. "regex": "none",
  30. "alertText": "* Maximum ",
  31. "alertText2": " caractères requis"
  32. },
  33. "min": {
  34. "regex": "none",
  35. "alertText": "* Valeur minimum requise "
  36. },
  37. "max": {
  38. "regex": "none",
  39. "alertText": "* Valeur maximum requise "
  40. },
  41. "past": {
  42. "regex": "none",
  43. "alertText": "* Date antérieure au "
  44. },
  45. "future": {
  46. "regex": "none",
  47. "alertText": "* Date postérieure au "
  48. },
  49. "maxCheckbox": {
  50. "regex": "none",
  51. "alertText": "* Nombre max de choix excédé"
  52. },
  53. "minCheckbox": {
  54. "regex": "none",
  55. "alertText": "* Veuillez choisir ",
  56. "alertText2": " options"
  57. },
  58. "equals": {
  59. "regex": "none",
  60. "alertText": "* Votre champ n'est pas identique"
  61. },
  62. "creditCard": {
  63. "regex": "none",
  64. "alertText": "* Numéro de carte bancaire valide"
  65. },
  66. "phone": {
  67. // credit: jquery.h5validate.js / orefalo
  68. "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
  69. "alertText": "* Numéro de téléphone invalide"
  70. },
  71. "email": {
  72. // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
  73. "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,
  74. "alertText": "* Adresse email invalide"
  75. },
  76. "integer": {
  77. "regex": /^[\-\+]?\d+$/,
  78. "alertText": "* Nombre entier invalide"
  79. },
  80. "number": {
  81. // Number, including positive, negative, and floating decimal. credit: orefalo
  82. "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
  83. "alertText": "* Nombre flottant invalide"
  84. },
  85. "date": {
  86. "regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
  87. "alertText": "* Date invalide, format YYYY-MM-DD requis"
  88. },
  89. "ipv4": {
  90. "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]))$/,
  91. "alertText": "* Adresse IP invalide"
  92. },
  93. "url": {
  94. "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,
  95. "alertText": "* URL invalide"
  96. },
  97. "onlyNumberSp": {
  98. "regex": /^[0-9\ ]+$/,
  99. "alertText": "* Seuls les chiffres sont acceptés"
  100. },
  101. "onlyLetterSp": {
  102. "regex": /^[a-zA-Z\u00C0-\u00D6\u00D9-\u00F6\u00F9-\u00FD\ \']+$/,
  103. "alertText": "* Seules les lettres sont acceptées"
  104. },
  105. "onlyLetterNumber": {
  106. "regex": /^[0-9a-zA-Z\u00C0-\u00D6\u00D9-\u00F6\u00F9-\u00FD]+$/,
  107. "alertText": "* Aucun caractère spécial n'est accepté"
  108. },
  109. // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
  110. "ajaxUserCall": {
  111. "url": "ajaxValidateFieldUser",
  112. "extraData": "name=eric",
  113. "alertTextLoad": "* Chargement, veuillez attendre",
  114. "alertText": "* Ce nom est déjà pris"
  115. },
  116. "ajaxNameCall": {
  117. "url": "ajaxValidateFieldName",
  118. "alertText": "* Ce nom est déjà pris",
  119. "alertTextOk": "*Ce nom est disponible",
  120. "alertTextLoad": "* Chargement, veuillez attendre"
  121. },
  122. "validate2fields": {
  123. "alertText": "Veuillez taper le mot HELLO"
  124. }
  125. };
  126. }
  127. };
  128. $.validationEngineLanguage.newLang();
  129. })(jQuery);