1# SubdivisionCode 2 3- `v::subdivisionCode(string $countryCode)` 4 5Validates subdivision country codes according to [ISO 3166-2][]. 6 7The `$countryCode` must be a country in [ISO 3166-1 alpha-2][] format. 8 9```php 10v::subdivisionCode('BR')->validate('SP'); // true 11v::subdivisionCode('US')->validate('CA'); // true 12``` 13 14This rule is case sensitive. 15 16## Available country codes 17 18- `AD`: Andorra 19- `AE`: United Arab Emirates 20- `AF`: Afghanistan 21- `AG`: Antigua and Barbuda 22- `AI`: Anguilla 23- `AL`: Albania 24- `AM`: Armenia 25- `AN`: AN.html 26- `AO`: Angola 27- `AQ`: Antarctica 28- `AR`: Argentina 29- `AS`: American Samoa 30- `AT`: Austria 31- `AU`: Australia 32- `AW`: Aruba 33- `AX`: Åland 34- `AZ`: Azerbaijan 35- `BA`: Bosnia and Herzegovina 36- `BB`: Barbados 37- `BD`: Bangladesh 38- `BE`: Belgium 39- `BF`: Burkina Faso 40- `BG`: Bulgaria 41- `BH`: Bahrain 42- `BI`: Burundi 43- `BJ`: Benin 44- `BL`: Saint Barthélemy 45- `BM`: Bermuda 46- `BN`: Brunei 47- `BO`: Bolivia 48- `BQ`: Bonaire 49- `BR`: Brazil 50- `BS`: Bahamas 51- `BT`: Bhutan 52- `BV`: Bouvet Island 53- `BW`: Botswana 54- `BY`: Belarus 55- `BZ`: Belize 56- `CA`: Canada 57- `CC`: Cocos [Keeling] Islands 58- `CD`: Democratic Republic of the Congo 59- `CF`: Central African Republic 60- `CG`: Republic of the Congo 61- `CH`: Switzerland 62- `CI`: Ivory Coast 63- `CK`: Cook Islands 64- `CL`: Chile 65- `CM`: Cameroon 66- `CN`: China 67- `CO`: Colombia 68- `CR`: Costa Rica 69- `CS`: CS.html 70- `CU`: Cuba 71- `CV`: Cape Verde 72- `CW`: Curacao 73- `CX`: Christmas Island 74- `CY`: Cyprus 75- `CZ`: Czech Republic 76- `DE`: Germany 77- `DJ`: Djibouti 78- `DK`: Denmark 79- `DM`: Dominica 80- `DO`: Dominican Republic 81- `DZ`: Algeria 82- `EC`: Ecuador 83- `EE`: Estonia 84- `EG`: Egypt 85- `EH`: Western Sahara 86- `ER`: Eritrea 87- `ES`: Spain 88- `ET`: Ethiopia 89- `FI`: Finland 90- `FJ`: Fiji 91- `FK`: Falkland Islands 92- `FM`: Micronesia 93- `FO`: Faroe Islands 94- `FR`: France 95- `GA`: Gabon 96- `GB`: United Kingdom 97- `GD`: Grenada 98- `GE`: Georgia 99- `GF`: French Guiana 100- `GG`: Guernsey 101- `GH`: Ghana 102- `GI`: Gibraltar 103- `GL`: Greenland 104- `GM`: Gambia 105- `GN`: Guinea 106- `GP`: Guadeloupe 107- `GQ`: Equatorial Guinea 108- `GR`: Greece 109- `GS`: South Georgia and the South Sandwich Islands 110- `GT`: Guatemala 111- `GU`: Guam 112- `GW`: Guinea-Bissau 113- `GY`: Guyana 114- `HK`: Hong Kong 115- `HM`: Heard Island and McDonald Islands 116- `HN`: Honduras 117- `HR`: Croatia 118- `HT`: Haiti 119- `HU`: Hungary 120- `ID`: Indonesia 121- `IE`: Ireland 122- `IL`: Israel 123- `IM`: Isle of Man 124- `IN`: India 125- `IO`: British Indian Ocean Territory 126- `IQ`: Iraq 127- `IR`: Iran 128- `IS`: Iceland 129- `IT`: Italy 130- `JE`: Jersey 131- `JM`: Jamaica 132- `JO`: Jordan 133- `JP`: Japan 134- `KE`: Kenya 135- `KG`: Kyrgyzstan 136- `KH`: Cambodia 137- `KI`: Kiribati 138- `KM`: Comoros 139- `KN`: Saint Kitts and Nevis 140- `KP`: North Korea 141- `KR`: South Korea 142- `KW`: Kuwait 143- `KY`: Cayman Islands 144- `KZ`: Kazakhstan 145- `LA`: Laos 146- `LB`: Lebanon 147- `LC`: Saint Lucia 148- `LI`: Liechtenstein 149- `LK`: Sri Lanka 150- `LR`: Liberia 151- `LS`: Lesotho 152- `LT`: Lithuania 153- `LU`: Luxembourg 154- `LV`: Latvia 155- `LY`: Libya 156- `MA`: Morocco 157- `MC`: Monaco 158- `MD`: Moldova 159- `ME`: Montenegro 160- `MF`: Saint Martin 161- `MG`: Madagascar 162- `MH`: Marshall Islands 163- `MK`: Macedonia 164- `ML`: Mali 165- `MM`: Myanmar [Burma] 166- `MN`: Mongolia 167- `MO`: Macao 168- `MP`: Northern Mariana Islands 169- `MQ`: Martinique 170- `MR`: Mauritania 171- `MS`: Montserrat 172- `MT`: Malta 173- `MU`: Mauritius 174- `MV`: Maldives 175- `MW`: Malawi 176- `MX`: Mexico 177- `MY`: Malaysia 178- `MZ`: Mozambique 179- `NA`: Namibia 180- `NC`: New Caledonia 181- `NE`: Niger 182- `NF`: Norfolk Island 183- `NG`: Nigeria 184- `NI`: Nicaragua 185- `NL`: Netherlands 186- `NO`: Norway 187- `NP`: Nepal 188- `NR`: Nauru 189- `NU`: Niue 190- `NZ`: New Zealand 191- `OM`: Oman 192- `PA`: Panama 193- `PE`: Peru 194- `PF`: French Polynesia 195- `PG`: Papua New Guinea 196- `PH`: Philippines 197- `PK`: Pakistan 198- `PL`: Poland 199- `PM`: Saint Pierre and Miquelon 200- `PN`: Pitcairn Islands 201- `PR`: Puerto Rico 202- `PS`: Palestine 203- `PT`: Portugal 204- `PW`: Palau 205- `PY`: Paraguay 206- `QA`: Qatar 207- `RE`: Réunion 208- `RO`: Romania 209- `RS`: Serbia 210- `RU`: Russia 211- `RW`: Rwanda 212- `SA`: Saudi Arabia 213- `SB`: Solomon Islands 214- `SC`: Seychelles 215- `SD`: Sudan 216- `SE`: Sweden 217- `SG`: Singapore 218- `SH`: Saint Helena 219- `SI`: Slovenia 220- `SJ`: Svalbard and Jan Mayen 221- `SK`: Slovakia 222- `SL`: Sierra Leone 223- `SM`: San Marino 224- `SN`: Senegal 225- `SO`: Somalia 226- `SR`: Suriname 227- `SS`: South Sudan 228- `ST`: São Tomé and Príncipe 229- `SV`: El Salvador 230- `SX`: Sint Maarten 231- `SY`: Syria 232- `SZ`: Swaziland 233- `TC`: Turks and Caicos Islands 234- `TD`: Chad 235- `TF`: French Southern Territories 236- `TG`: Togo 237- `TH`: Thailand 238- `TJ`: Tajikistan 239- `TK`: Tokelau 240- `TL`: East Timor 241- `TM`: Turkmenistan 242- `TN`: Tunisia 243- `TO`: Tonga 244- `TR`: Turkey 245- `TT`: Trinidad and Tobago 246- `TV`: Tuvalu 247- `TW`: Taiwan 248- `TZ`: Tanzania 249- `UA`: Ukraine 250- `UG`: Uganda 251- `UM`: U.S. Minor Outlying Islands 252- `US`: United States 253- `UY`: Uruguay 254- `UZ`: Uzbekistan 255- `VA`: Vatican City 256- `VC`: Saint Vincent and the Grenadines 257- `VE`: Venezuela 258- `VG`: British Virgin Islands 259- `VI`: U.S. Virgin Islands 260- `VN`: Vietnam 261- `VU`: Vanuatu 262- `WF`: Wallis and Futuna 263- `WS`: Samoa 264- `XK`: Kosovo 265- `YE`: Yemen 266- `YT`: Mayotte 267- `ZA`: South Africa 268- `ZM`: Zambia 269- `ZW`: Zimbabwe 270 271All data was extrated from [GeoNames][] which is licensed under a 272[Creative Commons Attribution 3.0 License][]. 273 274*** 275See also: 276 277 * [CountryCode](CountryCode.md) 278 * [Tld](Tld.md) 279 280 281[Creative Commons Attribution 3.0 License]: http://creativecommons.org/licenses/by/3.0 "Creative Commons Attribution 3.0 License" 282[GeoNames]: http://www.geonames.org "GetNames" 283[ISO 3166-1 alpha-2]: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 "ISO 3166-1 alpha-2" 284[ISO 3166-2]: http://en.wikipedia.org/wiki/ISO_3166-2 "ISO 3166-2" 285