| 1 | <?php |
||
| 14 | class CheckAccept implements ValidatorInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string expected checkbox value |
||
| 18 | */ |
||
| 19 | private $checked_value; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string|null |
||
| 23 | */ |
||
| 24 | private $error; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $checked_value expected checkbox value |
||
| 28 | * @param string|null $error optional custom error message |
||
| 29 | */ |
||
| 30 | 2 | public function __construct($checked_value, $error = null) |
|
| 35 | |||
| 36 | 1 | public function validate(FieldInterface $field, InputModel $model, InputValidation $validation) |
|
| 47 | } |
||
| 48 |