mirror of
https://github.com/Respect/Validation.git
synced 2024-06-03 14:22:16 +02:00
4c21a7ffc9
This reverts commit 9c9c76ebfb
.
41 lines
893 B
Markdown
41 lines
893 B
Markdown
# SubdivisionCode
|
|
|
|
- `SubdivisionCode(string $countryCode)`
|
|
|
|
Validates subdivision country codes according to [ISO 3166-2][].
|
|
|
|
The `$countryCode` must be a country in [ISO 3166-1 alpha-2][] format.
|
|
|
|
```php
|
|
v::subdivisionCode('BR')->validate('SP'); // true
|
|
v::subdivisionCode('US')->validate('CA'); // true
|
|
```
|
|
|
|
This rules uses data from [iso-codes][].
|
|
|
|
## Categorization
|
|
|
|
- ISO codes
|
|
- Localization
|
|
|
|
## Changelog
|
|
|
|
Version | Description
|
|
--------|-------------
|
|
1.0.0 | Created
|
|
|
|
***
|
|
See also:
|
|
|
|
- [CountryCode](CountryCode.md)
|
|
- [CurrencyCode](CurrencyCode.md)
|
|
- [KeyValue](KeyValue.md)
|
|
- [Nip](Nip.md)
|
|
- [Pesel](Pesel.md)
|
|
- [PolishIdCard](PolishIdCard.md)
|
|
- [Tld](Tld.md)
|
|
|
|
[iso-codes]: https://salsa.debian.org/iso-codes-team/iso-codes
|
|
[ISO 3166-1 alpha-2]: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 "ISO 3166-1 alpha-2"
|
|
[ISO 3166-2]: http://en.wikipedia.org/wiki/ISO_3166-2 "ISO 3166-2"
|