mirror of
https://github.com/Respect/Validation.git
synced 2024-06-03 06:12:17 +02:00
cc20a442a1
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
25 lines
563 B
PHP
25 lines
563 B
PHP
--CREDITS--
|
|
Henrique Moody <henriquemoody@gmail.com>
|
|
--TEST--
|
|
getFullMessage() should include all validation messages in a chain
|
|
--FILE--
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
use Respect\Validation\Exceptions\NestedValidationException;
|
|
use Respect\Validation\Validator;
|
|
|
|
try {
|
|
Validator::stringType()->length(2, 15)->assert(0);
|
|
} catch (NestedValidationException $e) {
|
|
echo $e->getFullMessage();
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
- All of the required rules must pass for 0
|
|
- 0 must be of type string
|
|
- 0 must have a length between 2 and 15
|