function DblogFilterForm::validateForm
Same name in other branches
- 9 core/modules/dblog/src/Form/DblogFilterForm.php \Drupal\dblog\Form\DblogFilterForm::validateForm()
- 10 core/modules/dblog/src/Form/DblogFilterForm.php \Drupal\dblog\Form\DblogFilterForm::validateForm()
- 11.x core/modules/dblog/src/Form/DblogFilterForm.php \Drupal\dblog\Form\DblogFilterForm::validateForm()
Overrides FormBase::validateForm
File
-
core/
modules/ dblog/ src/ Form/ DblogFilterForm.php, line 68
Class
- DblogFilterForm
- Provides the database logging filter form.
Namespace
Drupal\dblog\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
if ($form_state->isValueEmpty('type') && $form_state->isValueEmpty('severity')) {
$form_state->setErrorByName('type', $this->t('You must select something to filter by.'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.