public function isValid($value, array $context = \null) { if ($this->isRequired() && !isset($this->validators[Validate\NotIdentical::class])) { $this->prependValidator(new Validate\NotIdentical(['value' => $this->uncheckedValue, 'error' => 'Полето е задължително'])); } return parent::isValid($value, $context); }
public function isValid($value, array $context = \null) { $valid = parent::isValid($value, $context); if ($this->isArray && empty($value)) { $this->setValue([]); } return $valid; }