diff --git a/src/Multiplier.php b/src/Multiplier.php index 8cf4c12..9607f9b 100644 --- a/src/Multiplier.php +++ b/src/Multiplier.php @@ -170,8 +170,7 @@ public function addCreateButton(?string $caption = null, int $copyCount = 1): Cr */ public function validate(?array $controls = null): void { - /** @var Control[] $components */ - $components = $controls ?? $this->getComponents(); + $components = $controls ?? array_filter($this->getComponents(), fn ($component) => $component instanceof Control || $component instanceof Container); foreach ($components as $index => $control) { foreach ($this->noValidate as $item) {