Skip to content

Commit 07051a2

Browse files
committed
Container: calls validate() only on IControl & Container [Closes #86]
1 parent d260d62 commit 07051a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Forms/Container.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ public function isValid()
132132
public function validate(array $controls = NULL)
133133
{
134134
foreach ($controls === NULL ? $this->getComponents() : $controls as $control) {
135-
$control->validate();
135+
if ($control instanceof IControl || $control instanceof self) {
136+
$control->validate();
137+
}
136138
}
137139
if ($this->onValidate !== NULL) {
138140
if (!is_array($this->onValidate) && !$this->onValidate instanceof \Traversable) {

0 commit comments

Comments
 (0)