| 1 | <?php |
||
| 18 | class LessRule extends AbstractCompareRule |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var mixed maximum value |
||
| 22 | */ |
||
| 23 | protected $maxValue; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Setup validation rule |
||
| 27 | * |
||
| 28 | * @param mixed $maxValue |
||
| 29 | */ |
||
| 30 | 16 | public function __construct($maxValue) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Check input data |
||
| 37 | * |
||
| 38 | * @param NumericRule $input |
||
| 39 | * |
||
| 40 | * @return bool |
||
| 41 | */ |
||
| 42 | 16 | public function validate($input): bool |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Get error template |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | 7 | public function getDescription() : string |
|
| 56 | } |
||
| 57 |