| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class FormValidators |
| 4 |
* |
| 5 |
* @package Packetery\Module |
| 6 |
*/ |
| 7 |
|
| 8 |
declare(strict_types=1); |
| 9 |
|
| 10 |
namespace Packetery\Module; |
| 11 |
|
| 12 |
use PacketeryNette\Forms\Controls\BaseControl; |
| 13 |
|
| 14 |
/** |
| 15 |
* Class FormValidators |
| 16 |
* |
| 17 |
* @package Packetery\Module |
| 18 |
*/ |
| 19 |
class FormValidators { |
| 20 |
|
| 21 |
/** |
| 22 |
* Tests if input value is greater than argument. |
| 23 |
* |
| 24 |
* @param \PacketeryNette\Forms\Controls\BaseControl $input Form input. |
| 25 |
* @param float $arg Validation argument. |
| 26 |
* |
| 27 |
* @return bool |
| 28 |
*/ |
| 29 |
public static function greaterThan( BaseControl $input, float $arg ): bool { |
| 30 |
return $input->getValue() > $arg; |
| 31 |
} |
| 32 |
} |
| 33 |
|