Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiplier::validate(): Filter out non-validatable components
45ed76a started filtering components to `Control`s, to appease PHPStan, since `Container::validate()` only accepted `Control[]`. But `Multiplier` does not actually have `Control`s as direct children (other than the ‘Add’ `Submitter`s), so it would stop validating and filtering multiplied controls. a5a7348 reverted that part but kept the incorrect phpdoc type cast. Now, it works without the filter because `Container::validate()` already ignores non-validatable components but we should still respect its contract. Let’s filter the components before passing them down. This will also allow us to drop the lying phpdoc type cast. nette/forms 3.2.2 updated its phpdoc param type to allow that: nette/forms@6437671
- Loading branch information