|
@@ -0,0 +1,49 @@
|
|
|
|
+module.exports = {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ "num": /^[0-9]+$/,
|
|
|
|
+ "numeric": /^[0-9]+$/,
|
|
|
|
+ "alpha": /^[a-zA-Z_]+$/,
|
|
|
|
+ "alphabetic": /^[a-zA-Z_]+$/,
|
|
|
|
+ "alphabetique":/^[A-Za-z\s\u00C0-\u00FF]+$/,
|
|
|
|
+ "alphanum": /^[a-zA-Z0-9_]+$/,
|
|
|
|
+ "alphanumeric": /^[a-zA-Z0-9_]+$/,
|
|
|
|
+ "email": /^(")?(?:[^\."\s])(?:(?:[\.])?(?:[\w\-!#$%&'*+/=?^_`{|}~]))*\1@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,
|
|
|
|
+ "url": /(((^https?)|(^ftp)):\/\/((([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*)|(localhost|LOCALHOST))\/?)/i,
|
|
|
|
+ "ipAddress": /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,
|
|
|
|
+ "phone": /^(?:(?:\+|00)33|0)\s*[1-9](?:\d{2}){4}$/,
|
|
|
|
+ "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}$/,
|
|
|
|
+ "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}$/,
|
|
|
|
+ "time": /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/,
|
|
|
|
+ "price": /^\d+(\.\d{2})?$/,
|
|
|
|
+ "prix": /^\d+(\.\d{2})?$/,
|
|
|
|
+ "date": /^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/,
|
|
|
|
+ "tva": /^(5\.5|10|20)$/,
|
|
|
|
+ "password": /(?=^.{8,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
|
|
|
|
+ "motDePasse": /(?=^.{8,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
|
|
|
|
+ "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}/,
|
|
|
|
+ // "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})$/,
|
|
|
|
+ "tvaIntercom": /^(FR)([0-9]{11}$)/,
|
|
|
|
+ "iban": /^FR\d{12}[A-Z0-9]{11}\d{2}$/,
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ "timeMask": /[\d\s:amp]/i,
|
|
|
|
+ 'numMask': /[0-9]/i,
|
|
|
|
+ 'alphaMask': /[a-z_]/i,
|
|
|
|
+ 'alphanumMask': /[a-z0-9_]/i,
|
|
|
|
+ 'emailMask': /[\w.\-@'"!#$%&'*+/=?^_`{|}~]/i,
|
|
|
|
+ 'urlMask': /[a-z0-9_]/i,
|
|
|
|
+ 'ipAddressMask': /[\d\.]/i,
|
|
|
|
+ "phoneMask": /[0-9\+]/i,
|
|
|
|
+ "codePostMask": /[0-9ABab]/i,
|
|
|
|
+ 'passwordMask': /[\w.\-@'"!#$%&'*+/=?^_`{|}~]/i,
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|