All Classes Namespaces Files Functions Variables Pages
CountValidator Class Reference
Inheritance diagram for CountValidator:
AbstractValidator ValidatorInterface

Public Member Functions

 isValid ($value)
- Public Member Functions inherited from AbstractValidator
 __construct (array $options=[])
 validate ($value)
 getOptions ()

Protected Attributes

- Protected Attributes inherited from AbstractValidator
 $acceptsEmptyValues = true
 $supportedOptions = []
 $options = []

Additional Inherited Members

- Protected Member Functions inherited from AbstractValidator
 isValid ($value)
 addError ($message, $code, array $arguments=[], $title= '')
 isEmpty ($value)
 translateErrorMessage ($translateKey, $extensionName, $arguments=[])

Detailed Description

Validator for countable types

Scope: frontend

Definition at line 26 of file CountValidator.php.

Member Function Documentation

isValid (   $value)

The given value is valid if it is an array or that contains the specified amount of elements.


Definition at line 43 of file CountValidator.php.

References AbstractValidator\addError(), and AbstractValidator\translateErrorMessage().

Member Data Documentation

Initial value:
= [
'minimum' => [0, 'The minimum count to accept', 'integer']

Definition at line 31 of file CountValidator.php.