expensify-common 2.0.178 → 2.0.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CONST.d.ts +814 -0
- package/dist/CONST.js +820 -0
- package/package.json +1 -1
package/dist/CONST.js
CHANGED
|
@@ -907,6 +907,826 @@ const CONST = {
|
|
|
907
907
|
},
|
|
908
908
|
},
|
|
909
909
|
VIDEO_EXTENSIONS: ['mp4', 'mov', 'avi', 'wmv', 'flv', 'mkv', 'webm', '3gp', 'm4v', 'mpg', 'mpeg', 'ogv'],
|
|
910
|
+
// Country keys are ISO 3166-1 alpha-2 codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
911
|
+
// Per-country zip regex sources:
|
|
912
|
+
// - https://github.com/FormatterKit/PostalCodeValidator/blob/master/Sources/PostalCodeValidator/PostalCodeValidator.swift
|
|
913
|
+
// - https://en.wikipedia.org/wiki/List_of_postal_codes
|
|
914
|
+
COUNTRY_ZIP_REGEX_DATA: {
|
|
915
|
+
AC: {
|
|
916
|
+
regex: /^ASCN 1ZZ$/,
|
|
917
|
+
samples: 'ASCN 1ZZ',
|
|
918
|
+
},
|
|
919
|
+
AD: {
|
|
920
|
+
regex: /^AD[1-7]0\d$/,
|
|
921
|
+
samples: 'AD206, AD403, AD106, AD406',
|
|
922
|
+
},
|
|
923
|
+
// We have kept the empty object for the countries which do not have any zip code validation
|
|
924
|
+
// to ensure consistency so that the amount of countries displayed and in this object are same
|
|
925
|
+
AE: {},
|
|
926
|
+
AF: {
|
|
927
|
+
regex: /^\d{4}$/,
|
|
928
|
+
samples: '9536, 1476, 3842, 7975',
|
|
929
|
+
},
|
|
930
|
+
AG: {},
|
|
931
|
+
AI: {
|
|
932
|
+
regex: /^AI-2640$/,
|
|
933
|
+
samples: 'AI-2640',
|
|
934
|
+
},
|
|
935
|
+
AL: {
|
|
936
|
+
regex: /^\d{4}$/,
|
|
937
|
+
samples: '1631, 9721, 2360, 5574',
|
|
938
|
+
},
|
|
939
|
+
AM: {
|
|
940
|
+
regex: /^\d{4}$/,
|
|
941
|
+
samples: '5581, 7585, 8434, 2492',
|
|
942
|
+
},
|
|
943
|
+
AO: {},
|
|
944
|
+
AQ: {},
|
|
945
|
+
AR: {
|
|
946
|
+
regex: /^((?:[A-HJ-NP-Z])?\d{4})([A-Z]{3})?$/,
|
|
947
|
+
samples: 'Q7040GFQ, K2178ZHR, P6240EJG, J6070IAE',
|
|
948
|
+
},
|
|
949
|
+
AS: {
|
|
950
|
+
regex: /^96799$/,
|
|
951
|
+
samples: '96799',
|
|
952
|
+
},
|
|
953
|
+
AT: {
|
|
954
|
+
regex: /^\d{4}$/,
|
|
955
|
+
samples: '4223, 2052, 3544, 5488',
|
|
956
|
+
},
|
|
957
|
+
AU: {
|
|
958
|
+
regex: /^\d{4}$/,
|
|
959
|
+
samples: '7181, 7735, 9169, 8780',
|
|
960
|
+
},
|
|
961
|
+
AW: {},
|
|
962
|
+
AX: {
|
|
963
|
+
regex: /^22\d{3}$/,
|
|
964
|
+
samples: '22270, 22889, 22906, 22284',
|
|
965
|
+
},
|
|
966
|
+
AZ: {
|
|
967
|
+
regex: /^(AZ) (\d{4})$/,
|
|
968
|
+
samples: 'AZ 6704, AZ 5332, AZ 3907, AZ 6892',
|
|
969
|
+
},
|
|
970
|
+
BA: {
|
|
971
|
+
regex: /^\d{5}$/,
|
|
972
|
+
samples: '62722, 80420, 44595, 74614',
|
|
973
|
+
},
|
|
974
|
+
BB: {
|
|
975
|
+
regex: /^BB\d{5}$/,
|
|
976
|
+
samples: 'BB64089, BB17494, BB73163, BB25752',
|
|
977
|
+
},
|
|
978
|
+
BD: {
|
|
979
|
+
regex: /^\d{4}$/,
|
|
980
|
+
samples: '8585, 8175, 7381, 0154',
|
|
981
|
+
},
|
|
982
|
+
BE: {
|
|
983
|
+
regex: /^\d{4}$/,
|
|
984
|
+
samples: '7944, 5303, 6746, 7921',
|
|
985
|
+
},
|
|
986
|
+
BF: {},
|
|
987
|
+
BG: {
|
|
988
|
+
regex: /^\d{4}$/,
|
|
989
|
+
samples: '6409, 7657, 1206, 7908',
|
|
990
|
+
},
|
|
991
|
+
BH: {
|
|
992
|
+
regex: /^\d{3}\d?$/,
|
|
993
|
+
samples: '047, 1116, 490, 631',
|
|
994
|
+
},
|
|
995
|
+
BI: {},
|
|
996
|
+
BJ: {},
|
|
997
|
+
BL: {
|
|
998
|
+
regex: /^97133$/,
|
|
999
|
+
samples: '97133',
|
|
1000
|
+
},
|
|
1001
|
+
BM: {
|
|
1002
|
+
regex: /^[A-Z]{2} ?[A-Z0-9]{2}$/,
|
|
1003
|
+
samples: 'QV9P, OSJ1, PZ 3D, GR YK',
|
|
1004
|
+
},
|
|
1005
|
+
BN: {
|
|
1006
|
+
regex: /^[A-Z]{2} ?\d{4}$/,
|
|
1007
|
+
samples: 'PF 9925, TH1970, SC 4619, NF0781',
|
|
1008
|
+
},
|
|
1009
|
+
BO: {},
|
|
1010
|
+
BQ: {},
|
|
1011
|
+
BR: {
|
|
1012
|
+
regex: /^\d{5}-?\d{3}$/,
|
|
1013
|
+
samples: '18816-403, 95177-465, 43447-782, 39403-136',
|
|
1014
|
+
},
|
|
1015
|
+
BS: {},
|
|
1016
|
+
BT: {
|
|
1017
|
+
regex: /^\d{5}$/,
|
|
1018
|
+
samples: '28256, 52484, 30608, 93524',
|
|
1019
|
+
},
|
|
1020
|
+
BW: {},
|
|
1021
|
+
BY: {
|
|
1022
|
+
regex: /^\d{6}$/,
|
|
1023
|
+
samples: '504154, 360246, 741167, 895047',
|
|
1024
|
+
},
|
|
1025
|
+
BZ: {},
|
|
1026
|
+
CA: {
|
|
1027
|
+
regex: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z] ?\d[ABCEGHJ-NPRSTV-Z]\d$/,
|
|
1028
|
+
samples: 'S1A7K8, Y5H 4G6, H9V0P2, H1A1B5',
|
|
1029
|
+
},
|
|
1030
|
+
CC: {
|
|
1031
|
+
regex: /^6799$/,
|
|
1032
|
+
samples: '6799',
|
|
1033
|
+
},
|
|
1034
|
+
CD: {},
|
|
1035
|
+
CF: {},
|
|
1036
|
+
CG: {},
|
|
1037
|
+
CH: {
|
|
1038
|
+
regex: /^\d{4}$/,
|
|
1039
|
+
samples: '6370, 5271, 7873, 8220',
|
|
1040
|
+
},
|
|
1041
|
+
CI: {},
|
|
1042
|
+
CK: {},
|
|
1043
|
+
CL: {
|
|
1044
|
+
regex: /^\d{7}$/,
|
|
1045
|
+
samples: '7565829, 8702008, 3161669, 1607703',
|
|
1046
|
+
},
|
|
1047
|
+
CM: {},
|
|
1048
|
+
CN: {
|
|
1049
|
+
regex: /^\d{6}$/,
|
|
1050
|
+
samples: '240543, 870138, 295528, 861683',
|
|
1051
|
+
},
|
|
1052
|
+
CO: {
|
|
1053
|
+
regex: /^\d{6}$/,
|
|
1054
|
+
samples: '678978, 775145, 823943, 913970',
|
|
1055
|
+
},
|
|
1056
|
+
CR: {
|
|
1057
|
+
regex: /^\d{5}$/,
|
|
1058
|
+
samples: '28256, 52484, 30608, 93524',
|
|
1059
|
+
},
|
|
1060
|
+
CU: {
|
|
1061
|
+
regex: /^(?:CP)?(\d{5})$/,
|
|
1062
|
+
samples: '28256, 52484, 30608, 93524',
|
|
1063
|
+
},
|
|
1064
|
+
CV: {
|
|
1065
|
+
regex: /^\d{4}$/,
|
|
1066
|
+
samples: '9056, 8085, 0491, 4627',
|
|
1067
|
+
},
|
|
1068
|
+
CW: {},
|
|
1069
|
+
CX: {
|
|
1070
|
+
regex: /^6798$/,
|
|
1071
|
+
samples: '6798',
|
|
1072
|
+
},
|
|
1073
|
+
CY: {
|
|
1074
|
+
regex: /^\d{4}$/,
|
|
1075
|
+
samples: '9301, 2478, 1981, 6162',
|
|
1076
|
+
},
|
|
1077
|
+
CZ: {
|
|
1078
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1079
|
+
samples: '150 56, 50694, 229 08, 82811',
|
|
1080
|
+
},
|
|
1081
|
+
DE: {
|
|
1082
|
+
regex: /^\d{5}$/,
|
|
1083
|
+
samples: '33185, 37198, 81711, 44262',
|
|
1084
|
+
},
|
|
1085
|
+
DJ: {},
|
|
1086
|
+
DK: {
|
|
1087
|
+
regex: /^\d{4}$/,
|
|
1088
|
+
samples: '1429, 2457, 0637, 5764',
|
|
1089
|
+
},
|
|
1090
|
+
DM: {},
|
|
1091
|
+
DO: {
|
|
1092
|
+
regex: /^\d{5}$/,
|
|
1093
|
+
samples: '11877, 95773, 93875, 98032',
|
|
1094
|
+
},
|
|
1095
|
+
DZ: {
|
|
1096
|
+
regex: /^\d{5}$/,
|
|
1097
|
+
samples: '26581, 64621, 57550, 72201',
|
|
1098
|
+
},
|
|
1099
|
+
EC: {
|
|
1100
|
+
regex: /^\d{6}$/,
|
|
1101
|
+
samples: '541124, 873848, 011495, 334509',
|
|
1102
|
+
},
|
|
1103
|
+
EE: {
|
|
1104
|
+
regex: /^\d{5}$/,
|
|
1105
|
+
samples: '87173, 01127, 73214, 52381',
|
|
1106
|
+
},
|
|
1107
|
+
EG: {
|
|
1108
|
+
regex: /^\d{5}$/,
|
|
1109
|
+
samples: '98394, 05129, 91463, 77359',
|
|
1110
|
+
},
|
|
1111
|
+
EH: {
|
|
1112
|
+
regex: /^\d{5}$/,
|
|
1113
|
+
samples: '30577, 60264, 16487, 38593',
|
|
1114
|
+
},
|
|
1115
|
+
ER: {},
|
|
1116
|
+
ES: {
|
|
1117
|
+
regex: /^\d{5}$/,
|
|
1118
|
+
samples: '03315, 00413, 23179, 89324',
|
|
1119
|
+
},
|
|
1120
|
+
ET: {
|
|
1121
|
+
regex: /^\d{4}$/,
|
|
1122
|
+
samples: '6269, 8498, 4514, 7820',
|
|
1123
|
+
},
|
|
1124
|
+
FI: {
|
|
1125
|
+
regex: /^\d{5}$/,
|
|
1126
|
+
samples: '21859, 72086, 22422, 03774',
|
|
1127
|
+
},
|
|
1128
|
+
FJ: {},
|
|
1129
|
+
FK: {
|
|
1130
|
+
regex: /^FIQQ 1ZZ$/,
|
|
1131
|
+
samples: 'FIQQ 1ZZ',
|
|
1132
|
+
},
|
|
1133
|
+
FM: {
|
|
1134
|
+
regex: /^(9694[1-4])(?:[ -](\d{4}))?$/,
|
|
1135
|
+
samples: '96942-9352, 96944-4935, 96941 9065, 96943-5369',
|
|
1136
|
+
},
|
|
1137
|
+
FO: {
|
|
1138
|
+
regex: /^\d{3}$/,
|
|
1139
|
+
samples: '334, 068, 741, 787',
|
|
1140
|
+
},
|
|
1141
|
+
FR: {
|
|
1142
|
+
regex: /^\d{2} ?\d{3}$/,
|
|
1143
|
+
samples: '25822, 53 637, 55354, 82522',
|
|
1144
|
+
},
|
|
1145
|
+
GA: {},
|
|
1146
|
+
GB: {
|
|
1147
|
+
regex: /^[A-Z]{1,2}[0-9R][0-9A-Z]?\s*([0-9][ABD-HJLNP-UW-Z]{2})?$/,
|
|
1148
|
+
samples: 'LA102UX, BL2F8FX, BD1S9LU, WR4G 6LH, W1U',
|
|
1149
|
+
},
|
|
1150
|
+
GD: {},
|
|
1151
|
+
GE: {
|
|
1152
|
+
regex: /^\d{4}$/,
|
|
1153
|
+
samples: '1232, 9831, 4717, 9428',
|
|
1154
|
+
},
|
|
1155
|
+
GF: {
|
|
1156
|
+
regex: /^9[78]3\d{2}$/,
|
|
1157
|
+
samples: '98380, 97335, 98344, 97300',
|
|
1158
|
+
},
|
|
1159
|
+
GG: {
|
|
1160
|
+
regex: /^GY\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}$/,
|
|
1161
|
+
samples: 'GY757LD, GY6D 6XL, GY3Y2BU, GY85 1YO',
|
|
1162
|
+
},
|
|
1163
|
+
GH: {},
|
|
1164
|
+
GI: {
|
|
1165
|
+
regex: /^GX11 1AA$/,
|
|
1166
|
+
samples: 'GX11 1AA',
|
|
1167
|
+
},
|
|
1168
|
+
GL: {
|
|
1169
|
+
regex: /^39\d{2}$/,
|
|
1170
|
+
samples: '3964, 3915, 3963, 3956',
|
|
1171
|
+
},
|
|
1172
|
+
GM: {},
|
|
1173
|
+
GN: {
|
|
1174
|
+
regex: /^\d{3}$/,
|
|
1175
|
+
samples: '465, 994, 333, 078',
|
|
1176
|
+
},
|
|
1177
|
+
GP: {
|
|
1178
|
+
regex: /^9[78][01]\d{2}$/,
|
|
1179
|
+
samples: '98069, 97007, 97147, 97106',
|
|
1180
|
+
},
|
|
1181
|
+
GQ: {},
|
|
1182
|
+
GR: {
|
|
1183
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1184
|
+
samples: '98654, 319 78, 127 09, 590 52',
|
|
1185
|
+
},
|
|
1186
|
+
GS: {
|
|
1187
|
+
regex: /^SIQQ 1ZZ$/,
|
|
1188
|
+
samples: 'SIQQ 1ZZ',
|
|
1189
|
+
},
|
|
1190
|
+
GT: {
|
|
1191
|
+
regex: /^\d{5}$/,
|
|
1192
|
+
samples: '30553, 69925, 09376, 83719',
|
|
1193
|
+
},
|
|
1194
|
+
GU: {
|
|
1195
|
+
regex: /^((969)[1-3][0-2])$/,
|
|
1196
|
+
samples: '96922, 96932, 96921, 96911',
|
|
1197
|
+
},
|
|
1198
|
+
GW: {
|
|
1199
|
+
regex: /^\d{4}$/,
|
|
1200
|
+
samples: '1742, 7941, 4437, 7728',
|
|
1201
|
+
},
|
|
1202
|
+
GY: {},
|
|
1203
|
+
HK: {
|
|
1204
|
+
regex: /^999077$|^$/,
|
|
1205
|
+
samples: '999077',
|
|
1206
|
+
},
|
|
1207
|
+
HN: {
|
|
1208
|
+
regex: /^\d{5}$/,
|
|
1209
|
+
samples: '86238, 78999, 03594, 30406',
|
|
1210
|
+
},
|
|
1211
|
+
HR: {
|
|
1212
|
+
regex: /^\d{5}$/,
|
|
1213
|
+
samples: '85240, 80710, 78235, 98766',
|
|
1214
|
+
},
|
|
1215
|
+
HT: {
|
|
1216
|
+
regex: /^(?:HT)?(\d{4})$/,
|
|
1217
|
+
samples: '5101, HT6991, HT3871, 1126',
|
|
1218
|
+
},
|
|
1219
|
+
HU: {
|
|
1220
|
+
regex: /^\d{4}$/,
|
|
1221
|
+
samples: '0360, 2604, 3362, 4775',
|
|
1222
|
+
},
|
|
1223
|
+
ID: {
|
|
1224
|
+
regex: /^\d{5}$/,
|
|
1225
|
+
samples: '60993, 52656, 16521, 34931',
|
|
1226
|
+
},
|
|
1227
|
+
IE: {},
|
|
1228
|
+
IL: {
|
|
1229
|
+
regex: /^\d{5}(?:\d{2})?$/,
|
|
1230
|
+
samples: '74213, 6978354, 2441689, 4971551',
|
|
1231
|
+
},
|
|
1232
|
+
IM: {
|
|
1233
|
+
regex: /^IM\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}$/,
|
|
1234
|
+
samples: 'IM2X1JP, IM4V 9JU, IM3B1UP, IM8E 5XF',
|
|
1235
|
+
},
|
|
1236
|
+
IN: {
|
|
1237
|
+
regex: /^\d{6}$/,
|
|
1238
|
+
samples: '946956, 143659, 243258, 938385',
|
|
1239
|
+
},
|
|
1240
|
+
IO: {
|
|
1241
|
+
regex: /^BBND 1ZZ$/,
|
|
1242
|
+
samples: 'BBND 1ZZ',
|
|
1243
|
+
},
|
|
1244
|
+
IQ: {
|
|
1245
|
+
regex: /^\d{5}$/,
|
|
1246
|
+
samples: '63282, 87817, 38580, 47725',
|
|
1247
|
+
},
|
|
1248
|
+
IR: {
|
|
1249
|
+
regex: /^\d{5}-?\d{5}$/,
|
|
1250
|
+
samples: '0666174250, 6052682188, 02360-81920, 25102-08646',
|
|
1251
|
+
},
|
|
1252
|
+
IS: {
|
|
1253
|
+
regex: /^\d{3}$/,
|
|
1254
|
+
samples: '408, 013, 001, 936',
|
|
1255
|
+
},
|
|
1256
|
+
IT: {
|
|
1257
|
+
regex: /^\d{5}$/,
|
|
1258
|
+
samples: '31701, 61341, 92781, 45609',
|
|
1259
|
+
},
|
|
1260
|
+
JE: {
|
|
1261
|
+
regex: /^JE\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}$/,
|
|
1262
|
+
samples: 'JE0D 2EX, JE59 2OF, JE1X1ZW, JE0V 1SO',
|
|
1263
|
+
},
|
|
1264
|
+
JM: {},
|
|
1265
|
+
JO: {
|
|
1266
|
+
regex: /^\d{5}$/,
|
|
1267
|
+
samples: '20789, 02128, 52170, 40284',
|
|
1268
|
+
},
|
|
1269
|
+
JP: {
|
|
1270
|
+
regex: /^\d{3}-?\d{4}$/,
|
|
1271
|
+
samples: '5429642, 046-1544, 6463599, 368-5362',
|
|
1272
|
+
},
|
|
1273
|
+
KE: {
|
|
1274
|
+
regex: /^\d{5}$/,
|
|
1275
|
+
samples: '33043, 98830, 59324, 42876',
|
|
1276
|
+
},
|
|
1277
|
+
KG: {
|
|
1278
|
+
regex: /^\d{6}$/,
|
|
1279
|
+
samples: '500371, 176592, 184133, 225279',
|
|
1280
|
+
},
|
|
1281
|
+
KH: {
|
|
1282
|
+
regex: /^\d{5,6}$/,
|
|
1283
|
+
samples: '220281, 18824, 35379, 09570',
|
|
1284
|
+
},
|
|
1285
|
+
KI: {
|
|
1286
|
+
regex: /^KI\d{4}$/,
|
|
1287
|
+
samples: 'KI0104, KI0109, KI0112, KI0306',
|
|
1288
|
+
},
|
|
1289
|
+
KM: {},
|
|
1290
|
+
KN: {
|
|
1291
|
+
regex: /^KN\d{4}(-\d{4})?$/,
|
|
1292
|
+
samples: 'KN2522, KN2560-3032, KN3507, KN4440',
|
|
1293
|
+
},
|
|
1294
|
+
KP: {},
|
|
1295
|
+
KR: {
|
|
1296
|
+
regex: /^\d{5}$/,
|
|
1297
|
+
samples: '67417, 66648, 08359, 93750',
|
|
1298
|
+
},
|
|
1299
|
+
KW: {
|
|
1300
|
+
regex: /^\d{5}$/,
|
|
1301
|
+
samples: '74840, 53309, 71276, 59262',
|
|
1302
|
+
},
|
|
1303
|
+
KY: {
|
|
1304
|
+
regex: /^KY\d-\d{4}$/,
|
|
1305
|
+
samples: 'KY0-3078, KY1-7812, KY8-3729, KY3-4664',
|
|
1306
|
+
},
|
|
1307
|
+
KZ: {
|
|
1308
|
+
regex: /^\d{6}$/,
|
|
1309
|
+
samples: '129113, 976562, 226811, 933781',
|
|
1310
|
+
},
|
|
1311
|
+
LA: {
|
|
1312
|
+
regex: /^\d{5}$/,
|
|
1313
|
+
samples: '08875, 50779, 87756, 75932',
|
|
1314
|
+
},
|
|
1315
|
+
LB: {
|
|
1316
|
+
regex: /^(?:\d{4})(?: ?(?:\d{4}))?$/,
|
|
1317
|
+
samples: '5436 1302, 9830 7470, 76911911, 9453 1306',
|
|
1318
|
+
},
|
|
1319
|
+
LC: {
|
|
1320
|
+
regex: /^(LC)?\d{2} ?\d{3}$/,
|
|
1321
|
+
samples: '21080, LC99127, LC24 258, 51 740',
|
|
1322
|
+
},
|
|
1323
|
+
LI: {
|
|
1324
|
+
regex: /^\d{4}$/,
|
|
1325
|
+
samples: '6644, 2852, 4630, 4541',
|
|
1326
|
+
},
|
|
1327
|
+
LK: {
|
|
1328
|
+
regex: /^\d{5}$/,
|
|
1329
|
+
samples: '44605, 27721, 90695, 65514',
|
|
1330
|
+
},
|
|
1331
|
+
LR: {
|
|
1332
|
+
regex: /^\d{4}$/,
|
|
1333
|
+
samples: '6644, 2852, 4630, 4541',
|
|
1334
|
+
},
|
|
1335
|
+
LS: {
|
|
1336
|
+
regex: /^\d{3}$/,
|
|
1337
|
+
samples: '779, 803, 104, 897',
|
|
1338
|
+
},
|
|
1339
|
+
LT: {
|
|
1340
|
+
regex: /^((LT)[-])?(\d{5})$/,
|
|
1341
|
+
samples: 'LT-22248, LT-12796, 69822, 37280',
|
|
1342
|
+
},
|
|
1343
|
+
LU: {
|
|
1344
|
+
regex: /^((L)[-])?(\d{4})$/,
|
|
1345
|
+
samples: '5469, L-4476, 6304, 9739',
|
|
1346
|
+
},
|
|
1347
|
+
LV: {
|
|
1348
|
+
regex: /^((LV)[-])?\d{4}$/,
|
|
1349
|
+
samples: '9344, LV-5030, LV-0132, 8097',
|
|
1350
|
+
},
|
|
1351
|
+
LY: {},
|
|
1352
|
+
MA: {
|
|
1353
|
+
regex: /^\d{5}$/,
|
|
1354
|
+
samples: '50219, 95871, 80907, 79804',
|
|
1355
|
+
},
|
|
1356
|
+
MC: {
|
|
1357
|
+
regex: /^980\d{2}$/,
|
|
1358
|
+
samples: '98084, 98041, 98070, 98062',
|
|
1359
|
+
},
|
|
1360
|
+
MD: {
|
|
1361
|
+
regex: /^(MD[-]?)?(\d{4})$/,
|
|
1362
|
+
samples: '6250, MD-9681, MD3282, MD-0652',
|
|
1363
|
+
},
|
|
1364
|
+
ME: {
|
|
1365
|
+
regex: /^\d{5}$/,
|
|
1366
|
+
samples: '87622, 92688, 23129, 59566',
|
|
1367
|
+
},
|
|
1368
|
+
MF: {
|
|
1369
|
+
regex: /^9[78][01]\d{2}$/,
|
|
1370
|
+
samples: '97169, 98180, 98067, 98043',
|
|
1371
|
+
},
|
|
1372
|
+
MG: {
|
|
1373
|
+
regex: /^\d{3}$/,
|
|
1374
|
+
samples: '854, 084, 524, 064',
|
|
1375
|
+
},
|
|
1376
|
+
MH: {
|
|
1377
|
+
regex: /^((969)[6-7][0-9])(-\d{4})?/,
|
|
1378
|
+
samples: '96962, 96969, 96970-8530, 96960-3226',
|
|
1379
|
+
},
|
|
1380
|
+
MK: {
|
|
1381
|
+
regex: /^\d{4}$/,
|
|
1382
|
+
samples: '8299, 6904, 6144, 9753',
|
|
1383
|
+
},
|
|
1384
|
+
ML: {},
|
|
1385
|
+
MM: {
|
|
1386
|
+
regex: /^\d{5}$/,
|
|
1387
|
+
samples: '59188, 93943, 40829, 69981',
|
|
1388
|
+
},
|
|
1389
|
+
MN: {
|
|
1390
|
+
regex: /^\d{5}$/,
|
|
1391
|
+
samples: '94129, 29906, 53374, 80141',
|
|
1392
|
+
},
|
|
1393
|
+
MO: {},
|
|
1394
|
+
MP: {
|
|
1395
|
+
regex: /^(9695[012])(?:[ -](\d{4}))?$/,
|
|
1396
|
+
samples: '96952 3162, 96950 1567, 96951 2994, 96950 8745',
|
|
1397
|
+
},
|
|
1398
|
+
MQ: {
|
|
1399
|
+
regex: /^9[78]2\d{2}$/,
|
|
1400
|
+
samples: '98297, 97273, 97261, 98282',
|
|
1401
|
+
},
|
|
1402
|
+
MR: {},
|
|
1403
|
+
MS: {
|
|
1404
|
+
regex: /^[Mm][Ss][Rr]\s{0,1}\d{4}$/,
|
|
1405
|
+
samples: 'MSR1110, MSR1230, MSR1250, MSR1330',
|
|
1406
|
+
},
|
|
1407
|
+
MT: {
|
|
1408
|
+
regex: /^[A-Z]{3} [0-9]{4}|[A-Z]{2}[0-9]{2}|[A-Z]{2} [0-9]{2}|[A-Z]{3}[0-9]{4}|[A-Z]{3}[0-9]{2}|[A-Z]{3} [0-9]{2}$/,
|
|
1409
|
+
samples: 'DKV 8196, KSU9264, QII0259, HKH 1020',
|
|
1410
|
+
},
|
|
1411
|
+
MU: {
|
|
1412
|
+
regex: /^([0-9A-R]\d{4})$/,
|
|
1413
|
+
samples: 'H8310, 52591, M9826, F5810',
|
|
1414
|
+
},
|
|
1415
|
+
MV: {
|
|
1416
|
+
regex: /^\d{5}$/,
|
|
1417
|
+
samples: '16354, 20857, 50991, 72527',
|
|
1418
|
+
},
|
|
1419
|
+
MW: {},
|
|
1420
|
+
MX: {
|
|
1421
|
+
regex: /^\d{5}$/,
|
|
1422
|
+
samples: '71530, 76424, 73811, 50503',
|
|
1423
|
+
},
|
|
1424
|
+
MY: {
|
|
1425
|
+
regex: /^\d{5}$/,
|
|
1426
|
+
samples: '75958, 15826, 86715, 37081',
|
|
1427
|
+
},
|
|
1428
|
+
MZ: {
|
|
1429
|
+
regex: /^\d{4}$/,
|
|
1430
|
+
samples: '0902, 6258, 7826, 7150',
|
|
1431
|
+
},
|
|
1432
|
+
NA: {
|
|
1433
|
+
regex: /^\d{5}$/,
|
|
1434
|
+
samples: '68338, 63392, 21820, 61211',
|
|
1435
|
+
},
|
|
1436
|
+
NC: {
|
|
1437
|
+
regex: /^988\d{2}$/,
|
|
1438
|
+
samples: '98865, 98813, 98820, 98855',
|
|
1439
|
+
},
|
|
1440
|
+
NE: {
|
|
1441
|
+
regex: /^\d{4}$/,
|
|
1442
|
+
samples: '9790, 3270, 2239, 0400',
|
|
1443
|
+
},
|
|
1444
|
+
NF: {
|
|
1445
|
+
regex: /^2899$/,
|
|
1446
|
+
samples: '2899',
|
|
1447
|
+
},
|
|
1448
|
+
NG: {
|
|
1449
|
+
regex: /^\d{6}$/,
|
|
1450
|
+
samples: '289096, 223817, 199970, 840648',
|
|
1451
|
+
},
|
|
1452
|
+
NI: {
|
|
1453
|
+
regex: /^\d{5}$/,
|
|
1454
|
+
samples: '86308, 60956, 49945, 15470',
|
|
1455
|
+
},
|
|
1456
|
+
NL: {
|
|
1457
|
+
regex: /^\d{4} ?[A-Z]{2}$/,
|
|
1458
|
+
samples: '6998 VY, 5390 CK, 2476 PS, 8873OX',
|
|
1459
|
+
},
|
|
1460
|
+
NO: {
|
|
1461
|
+
regex: /^\d{4}$/,
|
|
1462
|
+
samples: '0711, 4104, 2683, 5015',
|
|
1463
|
+
},
|
|
1464
|
+
NP: {
|
|
1465
|
+
regex: /^\d{5}$/,
|
|
1466
|
+
samples: '42438, 73964, 66400, 33976',
|
|
1467
|
+
},
|
|
1468
|
+
NR: {
|
|
1469
|
+
regex: /^(NRU68)$/,
|
|
1470
|
+
samples: 'NRU68',
|
|
1471
|
+
},
|
|
1472
|
+
NU: {
|
|
1473
|
+
regex: /^(9974)$/,
|
|
1474
|
+
samples: '9974',
|
|
1475
|
+
},
|
|
1476
|
+
NZ: {
|
|
1477
|
+
regex: /^\d{4}$/,
|
|
1478
|
+
samples: '7015, 0780, 4109, 1422',
|
|
1479
|
+
},
|
|
1480
|
+
OM: {
|
|
1481
|
+
regex: /^(?:PC )?\d{3}$/,
|
|
1482
|
+
samples: 'PC 851, PC 362, PC 598, PC 499',
|
|
1483
|
+
},
|
|
1484
|
+
PA: {
|
|
1485
|
+
regex: /^\d{4}$/,
|
|
1486
|
+
samples: '0711, 4104, 2683, 5015',
|
|
1487
|
+
},
|
|
1488
|
+
PE: {
|
|
1489
|
+
regex: /^\d{5}$/,
|
|
1490
|
+
samples: '10013, 12081, 14833, 24615',
|
|
1491
|
+
},
|
|
1492
|
+
PF: {
|
|
1493
|
+
regex: /^987\d{2}$/,
|
|
1494
|
+
samples: '98755, 98710, 98748, 98791',
|
|
1495
|
+
},
|
|
1496
|
+
PG: {
|
|
1497
|
+
regex: /^\d{3}$/,
|
|
1498
|
+
samples: '193, 166, 880, 553',
|
|
1499
|
+
},
|
|
1500
|
+
PH: {
|
|
1501
|
+
regex: /^\d{4}$/,
|
|
1502
|
+
samples: '0137, 8216, 2876, 0876',
|
|
1503
|
+
},
|
|
1504
|
+
PK: {
|
|
1505
|
+
regex: /^\d{5}$/,
|
|
1506
|
+
samples: '78219, 84497, 62102, 12564',
|
|
1507
|
+
},
|
|
1508
|
+
PL: {
|
|
1509
|
+
regex: /^\d{2}-\d{3}$/,
|
|
1510
|
+
samples: '63-825, 26-714, 05-505, 15-200',
|
|
1511
|
+
},
|
|
1512
|
+
PM: {
|
|
1513
|
+
regex: /^(97500)$/,
|
|
1514
|
+
samples: '97500',
|
|
1515
|
+
},
|
|
1516
|
+
PN: {
|
|
1517
|
+
regex: /^PCRN 1ZZ$/,
|
|
1518
|
+
samples: 'PCRN 1ZZ',
|
|
1519
|
+
},
|
|
1520
|
+
PR: {
|
|
1521
|
+
regex: /^(00[679]\d{2})(?:[ -](\d{4}))?$/,
|
|
1522
|
+
samples: '00989 3603, 00639 0720, 00707-9803, 00610 7362',
|
|
1523
|
+
},
|
|
1524
|
+
PS: {
|
|
1525
|
+
regex: /^(00[679]\d{2})(?:[ -](\d{4}))?$/,
|
|
1526
|
+
samples: '00748, 00663, 00779-4433, 00934 1559',
|
|
1527
|
+
},
|
|
1528
|
+
PT: {
|
|
1529
|
+
regex: /^\d{4}-\d{3}$/,
|
|
1530
|
+
samples: '0060-917, 4391-979, 5551-657, 9961-093',
|
|
1531
|
+
},
|
|
1532
|
+
PW: {
|
|
1533
|
+
regex: /^(969(?:39|40))(?:[ -](\d{4}))?$/,
|
|
1534
|
+
samples: '96940, 96939, 96939 6004, 96940-1871',
|
|
1535
|
+
},
|
|
1536
|
+
PY: {
|
|
1537
|
+
regex: /^\d{4}$/,
|
|
1538
|
+
samples: '7895, 5835, 8783, 5887',
|
|
1539
|
+
},
|
|
1540
|
+
QA: {},
|
|
1541
|
+
RE: {
|
|
1542
|
+
regex: /^9[78]4\d{2}$/,
|
|
1543
|
+
samples: '98445, 97404, 98421, 98434',
|
|
1544
|
+
},
|
|
1545
|
+
RO: {
|
|
1546
|
+
regex: /^\d{6}$/,
|
|
1547
|
+
samples: '935929, 407608, 637434, 174574',
|
|
1548
|
+
},
|
|
1549
|
+
RS: {
|
|
1550
|
+
regex: /^\d{5,6}$/,
|
|
1551
|
+
samples: '929863, 259131, 687739, 07011',
|
|
1552
|
+
},
|
|
1553
|
+
RU: {
|
|
1554
|
+
regex: /^\d{6}$/,
|
|
1555
|
+
samples: '138294, 617323, 307906, 981238',
|
|
1556
|
+
},
|
|
1557
|
+
RW: {},
|
|
1558
|
+
SA: {
|
|
1559
|
+
regex: /^\d{5}(-{1}\d{4})?$/,
|
|
1560
|
+
samples: '86020-1256, 72375, 70280, 96328',
|
|
1561
|
+
},
|
|
1562
|
+
SB: {},
|
|
1563
|
+
SC: {},
|
|
1564
|
+
SD: {
|
|
1565
|
+
regex: /^\d{5}$/,
|
|
1566
|
+
samples: '78219, 84497, 62102, 12564',
|
|
1567
|
+
},
|
|
1568
|
+
SE: {
|
|
1569
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1570
|
+
samples: '095 39, 41052, 84687, 563 66',
|
|
1571
|
+
},
|
|
1572
|
+
SG: {
|
|
1573
|
+
regex: /^\d{6}$/,
|
|
1574
|
+
samples: '606542, 233985, 036755, 265255',
|
|
1575
|
+
},
|
|
1576
|
+
SH: {
|
|
1577
|
+
regex: /^(?:ASCN|TDCU|STHL) 1ZZ$/,
|
|
1578
|
+
samples: 'STHL 1ZZ, ASCN 1ZZ, TDCU 1ZZ',
|
|
1579
|
+
},
|
|
1580
|
+
SI: {
|
|
1581
|
+
regex: /^\d{4}$/,
|
|
1582
|
+
samples: '6898, 3413, 2031, 5732',
|
|
1583
|
+
},
|
|
1584
|
+
SJ: {
|
|
1585
|
+
regex: /^\d{4}$/,
|
|
1586
|
+
samples: '7616, 3163, 5769, 0237',
|
|
1587
|
+
},
|
|
1588
|
+
SK: {
|
|
1589
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1590
|
+
samples: '594 52, 813 34, 867 67, 41814',
|
|
1591
|
+
},
|
|
1592
|
+
SL: {},
|
|
1593
|
+
SM: {
|
|
1594
|
+
regex: /^4789\d$/,
|
|
1595
|
+
samples: '47894, 47895, 47893, 47899',
|
|
1596
|
+
},
|
|
1597
|
+
SN: {
|
|
1598
|
+
regex: /^[1-8]\d{4}$/,
|
|
1599
|
+
samples: '48336, 23224, 33261, 82430',
|
|
1600
|
+
},
|
|
1601
|
+
SO: {},
|
|
1602
|
+
SR: {},
|
|
1603
|
+
SS: {
|
|
1604
|
+
regex: /^[A-Z]{2} ?\d{5}$/,
|
|
1605
|
+
samples: 'JQ 80186, CU 46474, DE33738, MS 59107',
|
|
1606
|
+
},
|
|
1607
|
+
ST: {},
|
|
1608
|
+
SV: {},
|
|
1609
|
+
SX: {},
|
|
1610
|
+
SY: {},
|
|
1611
|
+
SZ: {
|
|
1612
|
+
regex: /^[HLMS]\d{3}$/,
|
|
1613
|
+
samples: 'H458, L986, M477, S916',
|
|
1614
|
+
},
|
|
1615
|
+
TA: {
|
|
1616
|
+
regex: /^TDCU 1ZZ$/,
|
|
1617
|
+
samples: 'TDCU 1ZZ',
|
|
1618
|
+
},
|
|
1619
|
+
TC: {
|
|
1620
|
+
regex: /^TKCA 1ZZ$/,
|
|
1621
|
+
samples: 'TKCA 1ZZ',
|
|
1622
|
+
},
|
|
1623
|
+
TD: {},
|
|
1624
|
+
TF: {},
|
|
1625
|
+
TG: {},
|
|
1626
|
+
TH: {
|
|
1627
|
+
regex: /^\d{5}$/,
|
|
1628
|
+
samples: '30706, 18695, 21044, 42496',
|
|
1629
|
+
},
|
|
1630
|
+
TJ: {
|
|
1631
|
+
regex: /^\d{6}$/,
|
|
1632
|
+
samples: '381098, 961344, 519925, 667883',
|
|
1633
|
+
},
|
|
1634
|
+
TK: {},
|
|
1635
|
+
TL: {},
|
|
1636
|
+
TM: {
|
|
1637
|
+
regex: /^\d{6}$/,
|
|
1638
|
+
samples: '544985, 164362, 425224, 374603',
|
|
1639
|
+
},
|
|
1640
|
+
TN: {
|
|
1641
|
+
regex: /^\d{4}$/,
|
|
1642
|
+
samples: '6075, 7340, 2574, 8988',
|
|
1643
|
+
},
|
|
1644
|
+
TO: {},
|
|
1645
|
+
TR: {
|
|
1646
|
+
regex: /^\d{5}$/,
|
|
1647
|
+
samples: '42524, 81057, 50859, 42677',
|
|
1648
|
+
},
|
|
1649
|
+
TT: {
|
|
1650
|
+
regex: /^\d{6}$/,
|
|
1651
|
+
samples: '041238, 033990, 763476, 981118',
|
|
1652
|
+
},
|
|
1653
|
+
TV: {},
|
|
1654
|
+
TW: {
|
|
1655
|
+
regex: /^\d{3}(?:\d{2})?$/,
|
|
1656
|
+
samples: '21577, 76068, 68698, 08912',
|
|
1657
|
+
},
|
|
1658
|
+
TZ: {},
|
|
1659
|
+
UA: {
|
|
1660
|
+
regex: /^\d{5}$/,
|
|
1661
|
+
samples: '10629, 81138, 15668, 30055',
|
|
1662
|
+
},
|
|
1663
|
+
UG: {},
|
|
1664
|
+
UM: {},
|
|
1665
|
+
US: {
|
|
1666
|
+
regex: /^[0-9]{5}(?:[- ][0-9]{4})?$/,
|
|
1667
|
+
samples: '12345, 12345-1234, 12345 1234',
|
|
1668
|
+
},
|
|
1669
|
+
UY: {
|
|
1670
|
+
regex: /^\d{5}$/,
|
|
1671
|
+
samples: '40073, 30136, 06583, 00021',
|
|
1672
|
+
},
|
|
1673
|
+
UZ: {
|
|
1674
|
+
regex: /^\d{6}$/,
|
|
1675
|
+
samples: '205122, 219713, 441699, 287471',
|
|
1676
|
+
},
|
|
1677
|
+
VA: {
|
|
1678
|
+
regex: /^(00120)$/,
|
|
1679
|
+
samples: '00120',
|
|
1680
|
+
},
|
|
1681
|
+
VC: {
|
|
1682
|
+
regex: /^VC\d{4}$/,
|
|
1683
|
+
samples: 'VC0600, VC0176, VC0616, VC4094',
|
|
1684
|
+
},
|
|
1685
|
+
VE: {
|
|
1686
|
+
regex: /^\d{4}$/,
|
|
1687
|
+
samples: '9692, 1953, 6680, 8302',
|
|
1688
|
+
},
|
|
1689
|
+
VG: {
|
|
1690
|
+
regex: /^VG\d{4}$/,
|
|
1691
|
+
samples: 'VG1204, VG7387, VG3431, VG6021',
|
|
1692
|
+
},
|
|
1693
|
+
VI: {
|
|
1694
|
+
regex: /^(008(?:(?:[0-4]\d)|(?:5[01])))(?:[ -](\d{4}))?$/,
|
|
1695
|
+
samples: '00820, 00804 2036, 00825 3344, 00811-5900',
|
|
1696
|
+
},
|
|
1697
|
+
VN: {
|
|
1698
|
+
regex: /^\d{6}$/,
|
|
1699
|
+
samples: '133836, 748243, 894060, 020597',
|
|
1700
|
+
},
|
|
1701
|
+
VU: {},
|
|
1702
|
+
WF: {
|
|
1703
|
+
regex: /^986\d{2}$/,
|
|
1704
|
+
samples: '98692, 98697, 98698, 98671',
|
|
1705
|
+
},
|
|
1706
|
+
WS: {
|
|
1707
|
+
regex: /^WS[1-2]\d{3}$/,
|
|
1708
|
+
samples: 'WS1349, WS2798, WS1751, WS2090',
|
|
1709
|
+
},
|
|
1710
|
+
XK: {
|
|
1711
|
+
regex: /^[1-7]\d{4}$/,
|
|
1712
|
+
samples: '56509, 15863, 46644, 21896',
|
|
1713
|
+
},
|
|
1714
|
+
YE: {},
|
|
1715
|
+
YT: {
|
|
1716
|
+
regex: /^976\d{2}$/,
|
|
1717
|
+
samples: '97698, 97697, 97632, 97609',
|
|
1718
|
+
},
|
|
1719
|
+
ZA: {
|
|
1720
|
+
regex: /^\d{4}$/,
|
|
1721
|
+
samples: '6855, 5179, 6956, 7147',
|
|
1722
|
+
},
|
|
1723
|
+
ZM: {
|
|
1724
|
+
regex: /^\d{5}$/,
|
|
1725
|
+
samples: '77603, 97367, 80454, 94484',
|
|
1726
|
+
},
|
|
1727
|
+
ZW: {},
|
|
1728
|
+
},
|
|
1729
|
+
GENERIC_ZIP_CODE_REGEX: /^(?:(?![\s-])[\w -]{0,9}[\w])?$/,
|
|
910
1730
|
};
|
|
911
1731
|
exports.CONST = CONST;
|
|
912
1732
|
/**
|