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

22 lines
427 B
PHP

--CREDITS--
Edson Lima <dddwebdeveloper@gmail.com>
Henrique Moody <henriquemoody@gmail.com>
--FILE--
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use Respect\Validation\Exceptions\AllOfException;
use Respect\Validation\Validator as v;
try {
v::not(v::intType()->between(1, 42))->assert(41);
} catch (AllOfException $e) {
echo $e->getFullMessage();
}
?>
--EXPECT--
- 41 must not be between 1 and 42