public function BulkForm::viewsFormValidate in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/field/BulkForm.php \Drupal\views\Plugin\views\field\BulkForm::viewsFormValidate()
- 10 core/modules/views/src/Plugin/views/field/BulkForm.php \Drupal\views\Plugin\views\field\BulkForm::viewsFormValidate()
File
- core/
modules/ views/ src/ Plugin/ views/ field/ BulkForm.php, line 467
Class
- BulkForm
- Defines a actions-based bulk operation form element.
Namespace
Drupal\views\Plugin\views\fieldCode
public function viewsFormValidate(&$form, FormStateInterface $form_state) {
$ids = $form_state
->getValue($this->options['id']);
if (empty($ids) || empty(array_filter($ids))) {
$form_state
->setErrorByName('', $this
->emptySelectedMessage());
}
}