protected function isValid($value)
    {
        if (!is_array($value) && !($value instanceof \Countable)) {
            $this->addError('The given subject was not countable.', 1253718666);
            return;
        }

        $minimum = intval($this->options['minimum']);
        $maximum = intval($this->options['maximum']);
        if (count($value) < $minimum || count($value) > $maximum) {
            $this->addError('The count must be between %1$d and %2$d.', 1253718831, [$minimum, $maximum]);
        }
    }
protected function isValid($value)
    {
        if (!is_array($value) && !($value instanceof \Countable)) {
            $this->addError('The given subject was not countable.', 1253718666);
            return;
        }

        $minimum = intval($this->options['minimum']);
        $maximum = intval($this->options['maximum']);
        if (count($value) < $minimum || count($value) > $maximum) {
            $this->addError('The count must be between %1$d and %2$d.', 1253718831, [$minimum, $maximum]);
        }
    }
protected function isValid ( $ value ) { if ( ! is_array ( $ value ) && ! ( $ value instanceof \ Countable ) ) { $ this -> addError ( 'The given subject was not countable.' , 1253718666 ) ; return ; } $ minimum = intval ( $ this -> options [ 'minimum' ] ) ; $ maximum = intval ( $ this -> options [ 'maximum' ] ) ; if ( count ( $ value ) < $ minimum || count ( $ value ) > $ maximum ) { $ this -> addError ( 'The count must be between %1$d and %2$d.' , 1253718831 , [ $ minimum , $ maximum ] ) ; } }
The given value is valid if it is an array or \Countable that contains the specified amount of elements.

@param mixed $value The value that should be validated
@return void
@api
The given value is valid if it is an array or \ Countable that contains the specified amount of elements .