| 1 | <?php |
||
| 5 | class MinLength extends AbstractStringRule |
||
| 6 | { |
||
| 7 | const OPTION_MIN = 'min'; |
||
| 8 | const OPTION_ENCODING = 'encoding'; |
||
| 9 | |||
| 10 | const MESSAGE = 'This input should have at least {min} characters'; |
||
| 11 | const LABELED_MESSAGE = '{label} should have at least {min} characters'; |
||
| 12 | |||
| 13 | protected $options = []; |
||
| 14 | |||
| 15 | protected $optionsIndexMap = [ |
||
| 16 | 0 => self::OPTION_MIN, |
||
| 17 | 1 => self::OPTION_ENCODING |
||
| 18 | ]; |
||
| 19 | |||
| 20 | 9 | public function validate($value, string $valueIdentifier = null):bool |
|
| 31 | } |
||
| 32 |