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
519 B
PHP
25 lines
519 B
PHP
--CREDITS--
|
|
Henrique Moody <henriquemoody@gmail.com>
|
|
Wojciech Frącz <fraczwojciech@gmail.com>
|
|
--FILE--
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
use Respect\Validation\Exceptions\NestedValidationException;
|
|
use Respect\Validation\Validator as v;
|
|
|
|
try {
|
|
v::key('email', v::email()->setTemplate('WRONG EMAIL!!!!!!'))->assert(['email' => 'qwe']);
|
|
} catch (NestedValidationException $exception) {
|
|
print_r($exception->getMessages());
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Array
|
|
(
|
|
[email] => WRONG EMAIL!!!!!!
|
|
)
|