| 1 | <?php |
||
| 19 | class CountValidator extends SizeValidator implements ValidatorInterface |
||
| 20 | { |
||
| 21 | |||
| 22 | use OnScenario, |
||
| 23 | Safe, |
||
| 24 | When; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @Label('There are not enough of {attribute} (minimum is {min})') |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | public $msgTooShort = ''; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @Label('There are too many of {attribute} (maximum is {max})') |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | public $msgTooLong = ''; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @Label('There must be exact {length} number of {attribute}') |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | public $msgLength = ''; |
||
| 43 | |||
| 44 | 8 | public function isValid(AnnotatedInterface $model, $attribute) |
|
| 62 | |||
| 63 | } |
||
| 64 |