validateFormField
The validateFormField hook is triggered when a form field is submitted. It
passes the widget object and the form ID as arguments and expects a widget
object as return value.
Parameters
\Contao\Widget
$widgetObject of the current front end widget. Use it to access form field properties.
string
$formIdAlias of the current form with the prefix
auto_. Don’t confuse with$form->id.array
$formDataForm configuration data from the
tl_formtable.\Contao\Form
$formThe form instance.
Return Value
Return the $widget instance after modification or your custom widget.