public function LoggerFilterForm::validateForm in MongoDB 8
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormBase::validateForm
File
- src/
Form/ LoggerFilterForm.php, line 94 - Contains \Drupal\mongodb\Form\DblogFilterForm.
Class
- LoggerFilterForm
- Provides the MongoDB logging filter form.
Namespace
Drupal\mongodb\FormCode
public function validateForm(array &$form, array &$form_state) {
if (empty($form_state['values']['type']) && empty($form_state['values']['severity'])) {
$this
->setFormError('type', $form_state, $this
->t('You must select something to filter by.'));
}
}