Skip to content

Commit f93bca5

Browse files
committed
Avoid custom params (errorBlock) from becoming attributes of the HTML elements
1 parent 13212f9 commit f93bca5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Manavo/BootstrapForms/FormBuilder.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@ public function openGroup(
5757
// set it to an empty string.
5858
$label = $label ? $this->label($name, $label, $labelOptions) : '';
5959

60-
return '<div' . $this->html->attributes($options) . '>' . $label;
60+
$attributes = [];
61+
foreach ($options as $key => $value) {
62+
if (!in_array($key, ['errorBlock'])) {
63+
$attributes[$key] = $value;
64+
}
65+
}
66+
67+
return '<div' . $this->html->attributes($attributes) . '>' . $label;
6168
}
6269

6370
/**

0 commit comments

Comments
 (0)