size} и не более {$this->max}"; } function not_empty($s) { return $s != ""; } public function isValid(Collection $container, $status = null) { if (!$this->max) { $this->max = $this->size; } $count = count(array_filter(array_map('trim', explode(";", $container->get($this->field))), array($this, 'not_empty'))); return $count >= $this->size && $count <= $this->max; } }