mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 07:45:45 +01:00
The class had too much complexity and some duplication on its children. I started doing this because I'm refactoring the tests to upgrade PHPUnit later, and then I made some improvements along the way. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
30 lines
796 B
PHP
30 lines
796 B
PHP
<?php
|
|
|
|
/*
|
|
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Exceptions;
|
|
|
|
class GroupedValidationException extends NestedValidationException
|
|
{
|
|
public const NONE = 'none';
|
|
public const SOME = 'some';
|
|
|
|
/**
|
|
* @var array<string, array<string, string>>
|
|
*/
|
|
protected array $defaultTemplates = [
|
|
self::MODE_DEFAULT => [
|
|
self::NONE => 'All of the required rules must pass for {{name}}',
|
|
self::SOME => 'These rules must pass for {{name}}',
|
|
],
|
|
self::MODE_NEGATIVE => [
|
|
self::NONE => 'None of there rules must pass for {{name}}',
|
|
self::SOME => 'These rules must not pass for {{name}}',
|
|
],
|
|
];
|
|
}
|