2019-02-17 17:19:18 +01:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
|
|
|
use Respect\Validation\Validator as v;
|
|
|
|
|
2023-04-01 07:20:05 +02:00
|
|
|
exceptionMessage(static fn() => v::postalCode('BR')->check('1057BV'));
|
|
|
|
exceptionMessage(static fn() => v::not(v::postalCode('NL'))->check('1057BV'));
|
|
|
|
exceptionFullMessage(static fn() => v::postalCode('BR')->assert('1057BV'));
|
|
|
|
exceptionFullMessage(static fn() => v::not(v::postalCode('NL'))->assert('1057BV'));
|
2019-02-17 17:19:18 +01:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
"1057BV" must be a valid postal code on "BR"
|
|
|
|
"1057BV" must not be a valid postal code on "NL"
|
|
|
|
- "1057BV" must be a valid postal code on "BR"
|
|
|
|
- "1057BV" must not be a valid postal code on "NL"
|