public function ContentLogFilterForm::validateForm in Content Synchronization 3.0.x
Same name and namespace in other branches
- 8.2 src/Form/ContentLogFilterForm.php \Drupal\content_sync\Form\ContentLogFilterForm::validateForm()
- 8 src/Form/ContentLogFilterForm.php \Drupal\content_sync\Form\ContentLogFilterForm::validateForm()
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/ ContentLogFilterForm.php, line 66
Class
- ContentLogFilterForm
- Provides the database logging filter form.
Namespace
Drupal\content_sync\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.'));
}
}