Skip to content

Instantly share code, notes, and snippets.

@rxaviers
Created December 11, 2017 17:07
Show Gist options
  • Save rxaviers/aa9f4951dd98278fcd151cac063fa6b5 to your computer and use it in GitHub Desktop.
Save rxaviers/aa9f4951dd98278fcd151cac063fa6b5 to your computer and use it in GitHub Desktop.
AR.json: "validation_regex": "([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?"
AR.json: "validation_regex": "([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?"
BE.json: "validation_regex": "[1-9]\\d{3}"
BE.json: "validation_regex": "[1-9]\\d{3}"
BN.json: "validation_regex": "[A-Z]{2}[ ]?\\d{4}"
BN.json: "validation_regex": "[A-Z]{2}[ ]?\\d{4}"
BR.json: "validation_regex": "\\d{5}[\\s\\-]?\\d{3}"
BR.json: "validation_regex": "\\d{5}[\\-]?\\d{3}"
CA.json: "validation_regex": "[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ ]?\\d[ABCEGHJ-NPRSTV-Z]\\d"
CA.json: "validation_regex": "[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ ]?\\d[ABCEGHJ-NPRSTV-Z]\\d"
CR.json: "validation_regex": "\\d{4,5}|\\d{3}[\\s\\-]?\\d{4}"
CR.json: "validation_regex": "\\d{4,5}|\\d{3}-\\d{4}"
DE.json: "validation_regex": "(0[1-9]|[1-9]\\d)\\d{3}"
DE.json: "validation_regex": "(0[1-9]|[1-9]\\d)\\d{3}"
FM.json: "validation_regex": "(9694[1-4])([ \\-]\\d{4})?"
FM.json: "validation_regex": "(9694[1-4])([ \\-]\\d{4})?"
FO.json: "validation_regex": "(FO[ \\-]?)?\\d{3}"
FO.json: "validation_regex": "(FO[ \\-]?)?\\d{3}"
GB.json: "validation_regex": "GIR[ ]?0AA|(?:(?:AB|AL|B|BA|BB|BD|BF|BH|BL|BN|BR|BS|BT|BX|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DD|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GY|GU|HA|HD|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|JE|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|ML|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|YO|ZE)(?:\\d[\\dA-Z]?[ ]?\\d[ABD-HJLN-UW-Z]{2}))|BFPO[ ]?\\d{1,4}"
GB.json: "validation_regex": "GIR[ ]?0AA|(?:(?:AB|AL|B|BA|BB|BD|BF|BH|BL|BN|BR|BS|BT|BX|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DD|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GY|GU|HA|HD|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|JE|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|ML|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|YO|ZE)(?:\\d[\\dA-Z]?[ ]?\\d[ABD-HJLN-UW-Z]{2}))|BFPO[ ]?\\d{1,4}"
GL.json: "validation_regex": "(DK-?)?39\\d{2}"
GL.json: "validation_regex": "(DK-?)?39\\d{2}"
IE.json: "validation_regex": "[A-Za-z0-9 \\-]{1,10}"
IE.json: "validation_regex": "[A-Za-z0-9 \\-]{1,10}"
JP.json: "validation_regex": "\\d{3}-\\d{4}"
JP.json: "validation_regex": "\\d{3}-\\d{4}"
JP.json: "validation_regex": "\\d{3}-\\d{4}"
JP.json: "validation_regex": "\\d{3}-\\d{4}"
LV.json: "validation_regex": "(LV[\\s\\-]?)\\d{4}"
LV.json: "validation_regex": "LV-\\d{4}"
MT.json: "validation_regex": "[A-Z]{3}[ ]?\\d{2,4}"
MT.json: "validation_regex": "[A-Z]{3}[ ]?\\d{2,4}"
NL.json: "validation_regex": "\\d{4}[ ]?[A-Z]{2}"
NL.json: "validation_regex": "\\d{4}[ ]?[A-Z]{2}"
PE.json: "validation_regex": "[0-2]?\\d{1,4}"
PE.json: "validation_regex": "[0-2]?\\d{1,4}"
PL.json: "validation_regex": "\\d{2}[\\s\\-]?\\d{3}"
PL.json: "validation_regex": "\\d{2}-\\d{3}"
PT.json: "validation_regex": "\\d{4}([\\-]\\d{3})?"
PT.json: "validation_regex": "\\d{4}([\\-]\\d{3})?"
RU.json: "validation_regex": "[1-9]\\d{5}"
RU.json: "validation_regex": "[1-9]\\d{5}"
RU.json: "validation_regex": "[1-9]\\d{5}"
RU.json: "validation_regex": "[1-9]\\d{5}"
SA.json: "validation_regex": "\\d{5}(-\\d{4})?"
SA.json: "validation_regex": "\\d{5}(-\\d{4})?"
SA.json: "validation_regex": "\\d{5}(-\\d{4})?"
SA.json: "validation_regex": "\\d{5}(-\\d{4})?"
US.json: "validation_regex": "\\d{5}([ \\-]?\\d{4})?"
US.json: "validation_regex": "\\d{5}([ \\-]?\\d{4})?"
UY.json: "validation_regex": "[1-9]\\d{4}"
UY.json: "validation_regex": "[1-9]\\d{4}"
VE.json: "validation_regex": "[1-8]\\d{3}([\\-][A-Z])?"
VE.json: "validation_regex": "[1-8]\\d{3}([\\-][A-Z])?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment