| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 15 | public static function validate($value, array $options = [], ?Model $model = null) |
||
| 16 | { |
||
| 17 | $min = $options['value']; |
||
| 18 | // TODO: now |
||
| 19 | $val = Respect::date('Y-m-d'); |
||
| 20 | $val->min($min); |
||
| 21 | if (!$val->validate($value)) { |
||
| 22 | throw new ValidatorException('Value is too small.'); |
||
| 23 | } |
||
| 24 | |||
| 25 | return $value; |
||
| 26 | } |
||
| 43 |