tao-test/app/vendor/respect/validation/docs/rules/SubdivisionCode.md

745 B

SubdivisionCode

  • v::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.


See also: