2018-11-30 09:25:42 +01:00
|
|
|
--CREDITS--
|
|
|
|
Henrique Moody <henriquemoody@gmail.com>
|
2015-07-29 05:31:21 +02:00
|
|
|
--TEST--
|
|
|
|
getFullMessage() should include all validation messages in a chain
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2019-02-09 11:44:33 +01:00
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2015-07-29 05:31:21 +02:00
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
2015-10-23 12:33:37 +02:00
|
|
|
use Respect\Validation\Exceptions\NestedValidationException;
|
2015-07-29 05:31:21 +02:00
|
|
|
use Respect\Validation\Validator;
|
|
|
|
|
|
|
|
try {
|
2015-10-07 16:52:03 +02:00
|
|
|
Validator::stringType()->length(2, 15)->assert(0);
|
2015-10-23 12:33:37 +02:00
|
|
|
} catch (NestedValidationException $e) {
|
2015-07-29 05:31:21 +02:00
|
|
|
echo $e->getFullMessage();
|
|
|
|
}
|
|
|
|
?>
|
2018-12-19 18:05:58 +01:00
|
|
|
--EXPECT--
|
2015-10-22 04:30:30 +02:00
|
|
|
- All of the required rules must pass for 0
|
2018-03-09 15:42:45 +01:00
|
|
|
- 0 must be of type string
|
2015-10-22 04:30:30 +02:00
|
|
|
- 0 must have a length between 2 and 15
|