respect-validation/library/Exceptions/MaximumAgeException.php
Henrique Moody 8d44bc3407
Refactor rules related to age
The "Age" rule was removed because it had too many responsibilities.
Instead "MaximumAge" was created (since there is already "MinimumAge").

This commit also introduces "AbstractAge" rule that is been used in both
mentioned rules.
2018-02-24 09:28:54 +01:00

33 lines
765 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 Henrique Moody <henriquemoody@gmail.com>
*/
final class MaximumAgeException extends ValidationException
{
/**
* {@inheritdoc}
*/
public static $defaultTemplates = [
self::MODE_DEFAULT => [
self::STANDARD => '{{name}} must be {{age}} years or less',
],
self::MODE_NEGATIVE => [
self::STANDARD => '{{name}} must not be {{age}} years or less',
],
];
}