mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 15:50:03 +01:00
That way, everything related to messages would stay in the same namespace. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
24 lines
488 B
PHP
24 lines
488 B
PHP
<?php
|
|
|
|
/*
|
|
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Rules;
|
|
|
|
use Respect\Validation\Message\Template;
|
|
|
|
#[Template(
|
|
'{{name}} must be less than {{compareTo}}',
|
|
'{{name}} must not be less than {{compareTo}}',
|
|
)]
|
|
final class LessThan extends AbstractComparison
|
|
{
|
|
protected function compare(mixed $left, mixed $right): bool
|
|
{
|
|
return $left < $right;
|
|
}
|
|
}
|