mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 18:50:14 +02:00
Generally speaking it makes more sense to have it always inclusive. Even though the word "between" does not imply that it is inclusive or exclusive it's more natural this way. Besides, users can always use "GreaterThan" and "LessThan" rules in case that is necessary. Removing this boolean parameter reduces a bit of the complexity of the rule. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
34 lines
861 B
PHP
34 lines
861 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Respect/Validation.
|
|
*
|
|
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
|
|
*
|
|
* For the full copyright and license information, please view the "LICENSE.md"
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Exceptions;
|
|
|
|
/**
|
|
* @author Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
|
|
* @author Henrique Moody <henriquemoody@gmail.com>
|
|
*/
|
|
final class BetweenException extends NestedValidationException
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static $defaultTemplates = [
|
|
self::MODE_DEFAULT => [
|
|
self::STANDARD => '{{name}} must be between {{minValue}} and {{maxValue}}',
|
|
],
|
|
self::MODE_NEGATIVE => [
|
|
self::STANDARD => '{{name}} must not be between {{minValue}} and {{maxValue}}',
|
|
],
|
|
];
|
|
}
|