mirror of
https://github.com/Respect/Validation.git
synced 2024-06-03 06:12:17 +02:00
2610a380dc
With this and the Lazy rule, the LazyConsecutive lost its purpose. While working on it, I did refactor the Domain rule a bit, but mainly to check how this rule could behave. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
1.1 KiB
1.1 KiB
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.
This rule requires sokil/php-isocodes and [php-isocodes-db-only][] to be installed.
v::subdivisionCode('BR')->validate('SP'); // true
v::subdivisionCode('US')->validate('CA'); // true
Categorization
- ISO codes
- Localization
Changelog
Version | Description |
---|---|
3.0.0 | Require sokil/php-isocodes and sokil/php-isocodes-db-only |
1.0.0 | Created |
See also: