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