Skip to content

Commit

Permalink
Pass field name and widget to input callback
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Sep 3, 2024
1 parent 654fca3 commit 3ed1f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public function validate(): bool

foreach ($this->widgets as $fieldName => $widget) {
if (null !== $this->inputCallback && method_exists($widget, 'setInputCallback')) {
$widget->setInputCallback($this->inputCallback);
$widget->setInputCallback(static fn () => ${$this->inputCallback}($fieldName, $widget));
}

$widget->validate();
Expand Down

0 comments on commit 3ed1f19

Please sign in to comment.