PageRenderTime 64ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/github.com/asaskevich/govalidator/types.go

https://gitlab.com/unofficial-mirrors/kubernetes
Go | 378 lines | 347 code | 16 blank | 15 comment | 2 complexity | e569a5f1aff0aee4783cc1c7f7872436 MD5 | raw file
  1. package govalidator
  2. import (
  3. "reflect"
  4. "regexp"
  5. "sync"
  6. )
  7. // Validator is a wrapper for a validator function that returns bool and accepts string.
  8. type Validator func(str string) bool
  9. // CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type.
  10. // The second parameter should be the context (in the case of validating a struct: the whole object being validated).
  11. type CustomTypeValidator func(i interface{}, o interface{}) bool
  12. // ParamValidator is a wrapper for validator functions that accepts additional parameters.
  13. type ParamValidator func(str string, params ...string) bool
  14. type tagOptionsMap map[string]string
  15. // UnsupportedTypeError is a wrapper for reflect.Type
  16. type UnsupportedTypeError struct {
  17. Type reflect.Type
  18. }
  19. // stringValues is a slice of reflect.Value holding *reflect.StringValue.
  20. // It implements the methods to sort by string.
  21. type stringValues []reflect.Value
  22. // ParamTagMap is a map of functions accept variants parameters
  23. var ParamTagMap = map[string]ParamValidator{
  24. "length": ByteLength,
  25. "stringlength": StringLength,
  26. "matches": StringMatches,
  27. }
  28. // ParamTagRegexMap maps param tags to their respective regexes.
  29. var ParamTagRegexMap = map[string]*regexp.Regexp{
  30. "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"),
  31. "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"),
  32. "matches": regexp.MustCompile(`matches\(([^)]+)\)`),
  33. }
  34. type customTypeTagMap struct {
  35. validators map[string]CustomTypeValidator
  36. sync.RWMutex
  37. }
  38. func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) {
  39. tm.RLock()
  40. defer tm.RUnlock()
  41. v, ok := tm.validators[name]
  42. return v, ok
  43. }
  44. func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) {
  45. tm.Lock()
  46. defer tm.Unlock()
  47. tm.validators[name] = ctv
  48. }
  49. // CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function.
  50. // Use this to validate compound or custom types that need to be handled as a whole, e.g.
  51. // `type UUID [16]byte` (this would be handled as an array of bytes).
  52. var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)}
  53. // TagMap is a map of functions, that can be used as tags for ValidateStruct function.
  54. var TagMap = map[string]Validator{
  55. "email": IsEmail,
  56. "url": IsURL,
  57. "dialstring": IsDialString,
  58. "requrl": IsRequestURL,
  59. "requri": IsRequestURI,
  60. "alpha": IsAlpha,
  61. "utfletter": IsUTFLetter,
  62. "alphanum": IsAlphanumeric,
  63. "utfletternum": IsUTFLetterNumeric,
  64. "numeric": IsNumeric,
  65. "utfnumeric": IsUTFNumeric,
  66. "utfdigit": IsUTFDigit,
  67. "hexadecimal": IsHexadecimal,
  68. "hexcolor": IsHexcolor,
  69. "rgbcolor": IsRGBcolor,
  70. "lowercase": IsLowerCase,
  71. "uppercase": IsUpperCase,
  72. "int": IsInt,
  73. "float": IsFloat,
  74. "null": IsNull,
  75. "uuid": IsUUID,
  76. "uuidv3": IsUUIDv3,
  77. "uuidv4": IsUUIDv4,
  78. "uuidv5": IsUUIDv5,
  79. "creditcard": IsCreditCard,
  80. "isbn10": IsISBN10,
  81. "isbn13": IsISBN13,
  82. "json": IsJSON,
  83. "multibyte": IsMultibyte,
  84. "ascii": IsASCII,
  85. "printableascii": IsPrintableASCII,
  86. "fullwidth": IsFullWidth,
  87. "halfwidth": IsHalfWidth,
  88. "variablewidth": IsVariableWidth,
  89. "base64": IsBase64,
  90. "datauri": IsDataURI,
  91. "ip": IsIP,
  92. "port": IsPort,
  93. "ipv4": IsIPv4,
  94. "ipv6": IsIPv6,
  95. "dns": IsDNSName,
  96. "host": IsHost,
  97. "mac": IsMAC,
  98. "latitude": IsLatitude,
  99. "longitude": IsLongitude,
  100. "ssn": IsSSN,
  101. "semver": IsSemver,
  102. }
  103. // ISO3166Entry stores country codes
  104. type ISO3166Entry struct {
  105. EnglishShortName string
  106. FrenchShortName string
  107. Alpha2Code string
  108. Alpha3Code string
  109. Numeric string
  110. }
  111. //ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes"
  112. var ISO3166List = []ISO3166Entry{
  113. {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"},
  114. {"Albania", "Albanie (l')", "AL", "ALB", "008"},
  115. {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"},
  116. {"Algeria", "Algérie (l')", "DZ", "DZA", "012"},
  117. {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"},
  118. {"Andorra", "Andorre (l')", "AD", "AND", "020"},
  119. {"Angola", "Angola (l')", "AO", "AGO", "024"},
  120. {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"},
  121. {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"},
  122. {"Argentina", "Argentine (l')", "AR", "ARG", "032"},
  123. {"Australia", "Australie (l')", "AU", "AUS", "036"},
  124. {"Austria", "Autriche (l')", "AT", "AUT", "040"},
  125. {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"},
  126. {"Bahrain", "Bahreïn", "BH", "BHR", "048"},
  127. {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"},
  128. {"Armenia", "Arménie (l')", "AM", "ARM", "051"},
  129. {"Barbados", "Barbade (la)", "BB", "BRB", "052"},
  130. {"Belgium", "Belgique (la)", "BE", "BEL", "056"},
  131. {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"},
  132. {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"},
  133. {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"},
  134. {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"},
  135. {"Botswana", "Botswana (le)", "BW", "BWA", "072"},
  136. {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"},
  137. {"Brazil", "Brésil (le)", "BR", "BRA", "076"},
  138. {"Belize", "Belize (le)", "BZ", "BLZ", "084"},
  139. {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"},
  140. {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"},
  141. {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"},
  142. {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"},
  143. {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"},
  144. {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"},
  145. {"Burundi", "Burundi (le)", "BI", "BDI", "108"},
  146. {"Belarus", "Bélarus (le)", "BY", "BLR", "112"},
  147. {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"},
  148. {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"},
  149. {"Canada", "Canada (le)", "CA", "CAN", "124"},
  150. {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"},
  151. {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"},
  152. {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"},
  153. {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"},
  154. {"Chad", "Tchad (le)", "TD", "TCD", "148"},
  155. {"Chile", "Chili (le)", "CL", "CHL", "152"},
  156. {"China", "Chine (la)", "CN", "CHN", "156"},
  157. {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"},
  158. {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"},
  159. {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"},
  160. {"Colombia", "Colombie (la)", "CO", "COL", "170"},
  161. {"Comoros (the)", "Comores (les)", "KM", "COM", "174"},
  162. {"Mayotte", "Mayotte", "YT", "MYT", "175"},
  163. {"Congo (the)", "Congo (le)", "CG", "COG", "178"},
  164. {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"},
  165. {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"},
  166. {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"},
  167. {"Croatia", "Croatie (la)", "HR", "HRV", "191"},
  168. {"Cuba", "Cuba", "CU", "CUB", "192"},
  169. {"Cyprus", "Chypre", "CY", "CYP", "196"},
  170. {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"},
  171. {"Benin", "Bénin (le)", "BJ", "BEN", "204"},
  172. {"Denmark", "Danemark (le)", "DK", "DNK", "208"},
  173. {"Dominica", "Dominique (la)", "DM", "DMA", "212"},
  174. {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"},
  175. {"Ecuador", "Équateur (l')", "EC", "ECU", "218"},
  176. {"El Salvador", "El Salvador", "SV", "SLV", "222"},
  177. {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"},
  178. {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"},
  179. {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"},
  180. {"Estonia", "Estonie (l')", "EE", "EST", "233"},
  181. {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"},
  182. {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"},
  183. {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"},
  184. {"Fiji", "Fidji (les)", "FJ", "FJI", "242"},
  185. {"Finland", "Finlande (la)", "FI", "FIN", "246"},
  186. {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"},
  187. {"France", "France (la)", "FR", "FRA", "250"},
  188. {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"},
  189. {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"},
  190. {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"},
  191. {"Djibouti", "Djibouti", "DJ", "DJI", "262"},
  192. {"Gabon", "Gabon (le)", "GA", "GAB", "266"},
  193. {"Georgia", "Géorgie (la)", "GE", "GEO", "268"},
  194. {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"},
  195. {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"},
  196. {"Germany", "Allemagne (l')", "DE", "DEU", "276"},
  197. {"Ghana", "Ghana (le)", "GH", "GHA", "288"},
  198. {"Gibraltar", "Gibraltar", "GI", "GIB", "292"},
  199. {"Kiribati", "Kiribati", "KI", "KIR", "296"},
  200. {"Greece", "Grèce (la)", "GR", "GRC", "300"},
  201. {"Greenland", "Groenland (le)", "GL", "GRL", "304"},
  202. {"Grenada", "Grenade (la)", "GD", "GRD", "308"},
  203. {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"},
  204. {"Guam", "Guam", "GU", "GUM", "316"},
  205. {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"},
  206. {"Guinea", "Guinée (la)", "GN", "GIN", "324"},
  207. {"Guyana", "Guyana (le)", "GY", "GUY", "328"},
  208. {"Haiti", "Haïti", "HT", "HTI", "332"},
  209. {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"},
  210. {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"},
  211. {"Honduras", "Honduras (le)", "HN", "HND", "340"},
  212. {"Hong Kong", "Hong Kong", "HK", "HKG", "344"},
  213. {"Hungary", "Hongrie (la)", "HU", "HUN", "348"},
  214. {"Iceland", "Islande (l')", "IS", "ISL", "352"},
  215. {"India", "Inde (l')", "IN", "IND", "356"},
  216. {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"},
  217. {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"},
  218. {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"},
  219. {"Ireland", "Irlande (l')", "IE", "IRL", "372"},
  220. {"Israel", "Israël", "IL", "ISR", "376"},
  221. {"Italy", "Italie (l')", "IT", "ITA", "380"},
  222. {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"},
  223. {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"},
  224. {"Japan", "Japon (le)", "JP", "JPN", "392"},
  225. {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"},
  226. {"Jordan", "Jordanie (la)", "JO", "JOR", "400"},
  227. {"Kenya", "Kenya (le)", "KE", "KEN", "404"},
  228. {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"},
  229. {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"},
  230. {"Kuwait", "Koweït (le)", "KW", "KWT", "414"},
  231. {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"},
  232. {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"},
  233. {"Lebanon", "Liban (le)", "LB", "LBN", "422"},
  234. {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"},
  235. {"Latvia", "Lettonie (la)", "LV", "LVA", "428"},
  236. {"Liberia", "Libéria (le)", "LR", "LBR", "430"},
  237. {"Libya", "Libye (la)", "LY", "LBY", "434"},
  238. {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"},
  239. {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"},
  240. {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"},
  241. {"Macao", "Macao", "MO", "MAC", "446"},
  242. {"Madagascar", "Madagascar", "MG", "MDG", "450"},
  243. {"Malawi", "Malawi (le)", "MW", "MWI", "454"},
  244. {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"},
  245. {"Maldives", "Maldives (les)", "MV", "MDV", "462"},
  246. {"Mali", "Mali (le)", "ML", "MLI", "466"},
  247. {"Malta", "Malte", "MT", "MLT", "470"},
  248. {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"},
  249. {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"},
  250. {"Mauritius", "Maurice", "MU", "MUS", "480"},
  251. {"Mexico", "Mexique (le)", "MX", "MEX", "484"},
  252. {"Monaco", "Monaco", "MC", "MCO", "492"},
  253. {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"},
  254. {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"},
  255. {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"},
  256. {"Montserrat", "Montserrat", "MS", "MSR", "500"},
  257. {"Morocco", "Maroc (le)", "MA", "MAR", "504"},
  258. {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"},
  259. {"Oman", "Oman", "OM", "OMN", "512"},
  260. {"Namibia", "Namibie (la)", "NA", "NAM", "516"},
  261. {"Nauru", "Nauru", "NR", "NRU", "520"},
  262. {"Nepal", "Népal (le)", "NP", "NPL", "524"},
  263. {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"},
  264. {"Curaçao", "Curaçao", "CW", "CUW", "531"},
  265. {"Aruba", "Aruba", "AW", "ABW", "533"},
  266. {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"},
  267. {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"},
  268. {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"},
  269. {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"},
  270. {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"},
  271. {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"},
  272. {"Niger (the)", "Niger (le)", "NE", "NER", "562"},
  273. {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"},
  274. {"Niue", "Niue", "NU", "NIU", "570"},
  275. {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"},
  276. {"Norway", "Norvège (la)", "NO", "NOR", "578"},
  277. {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"},
  278. {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"},
  279. {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"},
  280. {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"},
  281. {"Palau", "Palaos (les)", "PW", "PLW", "585"},
  282. {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"},
  283. {"Panama", "Panama (le)", "PA", "PAN", "591"},
  284. {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"},
  285. {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"},
  286. {"Peru", "Pérou (le)", "PE", "PER", "604"},
  287. {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"},
  288. {"Pitcairn", "Pitcairn", "PN", "PCN", "612"},
  289. {"Poland", "Pologne (la)", "PL", "POL", "616"},
  290. {"Portugal", "Portugal (le)", "PT", "PRT", "620"},
  291. {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"},
  292. {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"},
  293. {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"},
  294. {"Qatar", "Qatar (le)", "QA", "QAT", "634"},
  295. {"Réunion", "Réunion (La)", "RE", "REU", "638"},
  296. {"Romania", "Roumanie (la)", "RO", "ROU", "642"},
  297. {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"},
  298. {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"},
  299. {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"},
  300. {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"},
  301. {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"},
  302. {"Anguilla", "Anguilla", "AI", "AIA", "660"},
  303. {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"},
  304. {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"},
  305. {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"},
  306. {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"},
  307. {"San Marino", "Saint-Marin", "SM", "SMR", "674"},
  308. {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"},
  309. {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"},
  310. {"Senegal", "Sénégal (le)", "SN", "SEN", "686"},
  311. {"Serbia", "Serbie (la)", "RS", "SRB", "688"},
  312. {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"},
  313. {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"},
  314. {"Singapore", "Singapour", "SG", "SGP", "702"},
  315. {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"},
  316. {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"},
  317. {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"},
  318. {"Somalia", "Somalie (la)", "SO", "SOM", "706"},
  319. {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"},
  320. {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"},
  321. {"Spain", "Espagne (l')", "ES", "ESP", "724"},
  322. {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"},
  323. {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"},
  324. {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"},
  325. {"Suriname", "Suriname (le)", "SR", "SUR", "740"},
  326. {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"},
  327. {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"},
  328. {"Sweden", "Suède (la)", "SE", "SWE", "752"},
  329. {"Switzerland", "Suisse (la)", "CH", "CHE", "756"},
  330. {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"},
  331. {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"},
  332. {"Thailand", "Thaïlande (la)", "TH", "THA", "764"},
  333. {"Togo", "Togo (le)", "TG", "TGO", "768"},
  334. {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"},
  335. {"Tonga", "Tonga (les)", "TO", "TON", "776"},
  336. {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"},
  337. {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"},
  338. {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"},
  339. {"Turkey", "Turquie (la)", "TR", "TUR", "792"},
  340. {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"},
  341. {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"},
  342. {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"},
  343. {"Uganda", "Ouganda (l')", "UG", "UGA", "800"},
  344. {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"},
  345. {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"},
  346. {"Egypt", "Égypte (l')", "EG", "EGY", "818"},
  347. {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"},
  348. {"Guernsey", "Guernesey", "GG", "GGY", "831"},
  349. {"Jersey", "Jersey", "JE", "JEY", "832"},
  350. {"Isle of Man", "Île de Man", "IM", "IMN", "833"},
  351. {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"},
  352. {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"},
  353. {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"},
  354. {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"},
  355. {"Uruguay", "Uruguay (l')", "UY", "URY", "858"},
  356. {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"},
  357. {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"},
  358. {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"},
  359. {"Samoa", "Samoa (le)", "WS", "WSM", "882"},
  360. {"Yemen", "Yémen (le)", "YE", "YEM", "887"},
  361. {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"},
  362. }