respect-validation/docs/rules/SubdivisionCode.md
Henrique Moody 2d0f56d9cb
Merge branch '1.1'
This commit will revert the update of subdivision codes [1] since the
way we store this data is very different from the merged branch.

[1]: 8b8f7db713

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-05-29 23:17:53 +02:00

893 B

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.

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: