mirror of
https://github.com/Respect/Validation.git
synced 2024-06-07 16:22:16 +02:00
718bacad04
There is no much benefit from having individual rules for each country's subdivision, quite the opposite. It increases the amount of code and makes it hard to change the implementation of these rules. Right now, the only sane way to change those rules is with a customized script. This commit will remove the Subdivision Code rules per country and instead will put that information into JSON files. We both wouldn't like to keep this in this library anymore, and we are considering having another library to deal with this data [1], but since it seems like it may take some time, looks better to do it temporarily here. [1]: https://github.com/sokil/php-isocodes/issues/12 Co-authored-by: Mazen Touati <mazen_touati@hotmail.com> Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
76 lines
2 KiB
JSON
76 lines
2 KiB
JSON
{
|
|
"source": "http://www.geonames.org/ES/administrative-division-spain.html",
|
|
"country": "Spain",
|
|
"subdivisions": {
|
|
"A": "Alicante",
|
|
"AB": "Albacete",
|
|
"AL": "Almería",
|
|
"AN": "Comunidad Autónoma de Andalucía",
|
|
"AR": "Comunidad Autónoma de Aragón",
|
|
"AS": "Comunidad Autónoma del Principado de Asturias",
|
|
"AV": "Ávila",
|
|
"B": "Barcelona",
|
|
"BA": "Badajoz",
|
|
"BI": "Vizcaya",
|
|
"BU": "Burgos",
|
|
"C": "A Coruña",
|
|
"CA": "Cádiz",
|
|
"CB": "Comunidad Autónoma de Cantabria",
|
|
"CC": "Cáceres",
|
|
"CE": "Ceuta",
|
|
"CL": "Comunidad Autónoma de Castilla y León",
|
|
"CM": "Comunidad Autónoma de Castilla-La Mancha",
|
|
"CN": "Comunidad Autónoma de Canarias",
|
|
"CO": "Córdoba",
|
|
"CR": "Ciudad Real",
|
|
"CS": "Castellón",
|
|
"CT": "Catalunya",
|
|
"CU": "Cuenca",
|
|
"EX": "Comunidad Autónoma de Extremadura",
|
|
"GA": "Comunidad Autónoma de Galicia",
|
|
"GC": "Las Palmas",
|
|
"GI": "Girona",
|
|
"GR": "Granada",
|
|
"GU": "Guadalajara",
|
|
"H": "Huelva",
|
|
"HU": "Huesca",
|
|
"IB": "Comunidad Autónoma de las Islas Baleares",
|
|
"J": "Jaén",
|
|
"L": "Lleida",
|
|
"LE": "León",
|
|
"LO": "La Rioja",
|
|
"LU": "Lugo",
|
|
"M": "Madrid",
|
|
"MA": "Málaga",
|
|
"MC": "Comunidad Autónoma de la Región de Murcia",
|
|
"MD": "Comunidad de Madrid",
|
|
"ML": "Melilla",
|
|
"MU": "Murcia",
|
|
"NA": "Navarra",
|
|
"NC": "Comunidad Foral de Navarra",
|
|
"O": "Asturias",
|
|
"OR": "Ourense",
|
|
"P": "Palencia",
|
|
"PM": "Baleares",
|
|
"PO": "Pontevedra",
|
|
"PV": "Euskal Autonomia Erkidegoa",
|
|
"RI": "Comunidad Autónoma de La Rioja",
|
|
"S": "Cantabria",
|
|
"SA": "Salamanca",
|
|
"SE": "Sevilla",
|
|
"SG": "Segovia",
|
|
"SO": "Soria",
|
|
"SS": "Guipúzcoa",
|
|
"T": "Tarragona",
|
|
"TE": "Teruel",
|
|
"TF": "Santa Cruz de Tenerife",
|
|
"TO": "Toledo",
|
|
"V": "Valencia",
|
|
"VA": "Valladolid",
|
|
"VC": "Comunidad Valenciana",
|
|
"VI": "Álava",
|
|
"Z": "Zaragoza",
|
|
"ZA": "Zamora"
|
|
}
|
|
}
|