mirror of
https://github.com/Respect/Validation.git
synced 2024-06-28 02:00:06 +02:00
When creating a result with a sibling in the When rule, the result generates an unhelpful message. In most of the use cases of the When rule, the initial rule ("when") is only helpful in determining which will be the "real" rule to use. Those changes will change the When rule not to generate results with siblings. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
13 lines
240 B
PHP
13 lines
240 B
PHP
--FILE--
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
use Respect\Validation\Validator as v;
|
|
|
|
exceptionMessage(static fn() => v::when(v::alwaysInvalid(), v::alwaysValid())->check('foo'));
|
|
?>
|
|
--EXPECT--
|
|
"foo" is not valid
|