respect-validation/tests/integration/rules/identityCard_2.phpt
Henrique Moody cc20a442a1
Apply "SlevomatCodingStandard.TypeHints.DeclareStrictTypes"
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-02-09 14:11:12 +01:00

20 lines
429 B
PHP

--CREDITS--
Henrique Moody <henriquemoody@gmail.com>
--FILE--
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
use Respect\Validation\Exceptions\Locale\PlIdentityCardException;
use Respect\Validation\Validator as v;
try {
v::identityCard('PL')->check('AYE205411');
} catch (PlIdentityCardException $e) {
echo $e->getMessage();
}
?>
--EXPECT--
"AYE205411" must be a valid Polish Identity Card number