respect-validation/docs/rules/IdentityCard.md
2018-08-23 02:12:44 +02:00

606 B

IdentityCard

  • IdentityCard(string $countryCode)

Validates Identity Card numbers according to the defined country.

v::identityCard('PL')->validate('AYW036733'); // true
v::identityCard('PL')->validate('APH505567'); // true
v::identityCard('PL')->validate('APH 505567'); // false
v::identityCard('PL')->validate('AYW036731'); // false

For now this rule only accepts Polish Identity Card numbers (Dowód Osobisty).

Changelog

Version Description
1.1.0 Created

See also: