index.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. module.exports = {
  2. "num": /^[0-9]+$/,
  3. "numeric": /^[0-9]+$/,
  4. "alpha": /^[a-zA-Z_]+$/,
  5. "alphabetic": /^[a-zA-Z_]+$/,
  6. "alphabetique":/^[A-Za-z\s\u00C0-\u00FF]+$/,
  7. "alphanum": /^[a-zA-Z0-9_]+$/,
  8. "alphanumeric": /^[a-zA-Z0-9_]+$/,
  9. "email": /^(")?(?:[^\."\s])(?:(?:[\.])?(?:[\w\-!#$%&'*+/=?^_`{|}~]))*\1@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,
  10. "url": /(((^https?)|(^ftp)):\/\/((([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*)|(localhost|LOCALHOST))\/?)/i,
  11. "ipAddress": /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,
  12. "phone": /^(?:(?:\+|00)33|0)\s*[1-9](?:\d{2}){4}$/,
  13. "codePost": /^(((?!(96|97|98|99|00)))[0-9]{5})$|(2A|2B|2a|2b)[0-9]{3}$|(971|972|973|974|975|976)[0-9]{2}$/,
  14. "codePostal": /^(((?!(96|97|98|99|00)))[0-9]{5})$|(2A|2B|2a|2b)[0-9]{3}$|(971|972|973|974|975|976)[0-9]{2}$/,
  15. "time": /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/,
  16. "price": /^\d+(\.\d{2})?$/,
  17. "prix": /^\d+(\.\d{2})?$/,
  18. "date": /^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/,
  19. "tva": /^(5\.5|10|20)$/,
  20. "password": /(?=^.{8,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
  21. "motDePasse": /(?=^.{8,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
  22. "matricule": /[A-HJ-NP-TV-Z]{2}[\s-]{0,1}[0-9]{3}[\s-]{0,1}[A-HJ-NP-TV-Z]{2}|[0-9]{2,4}[\s-]{0,1}[A-Z]{1,3}[\s-]{0,1}[0-9]{2}/,
  23. // "matricule": /(^\d{1,4}[A-Za-z]{1,4}\d{1,2}$)|(^[A-Za-z]{1,2}\s*\d{1,3}\s*[A-Za-z]{1,2})|(^\d{1,4}-[A-Za-z]{1,4}-\d{1,2}$)|(^[A-Za-z]{1,2}-\s*\d{1,3}-\s*[A-Za-z]{1,2})$/,
  24. "tvaIntercom": /^(FR)([0-9]{11}$)/,
  25. "iban": /^FR\d{12}[A-Z0-9]{11}\d{2}$/,
  26. "timeMask": /[\d\s:amp]/i,
  27. 'numMask': /[0-9]/i,
  28. 'alphaMask': /[a-z_]/i,
  29. 'alphanumMask': /[a-z0-9_]/i,
  30. 'emailMask': /[\w.\-@'"!#$%&'*+/=?^_`{|}~]/i,
  31. 'urlMask': /[a-z0-9_]/i,
  32. 'ipAddressMask': /[\d\.]/i,
  33. "phoneMask": /[0-9\+]/i,
  34. "codePostMask": /[0-9ABab]/i,
  35. 'passwordMask': /[\w.\-@'"!#$%&'*+/=?^_`{|}~]/i,
  36. }