You are here

public function BulkForm::viewsFormValidate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Plugin/views/field/BulkForm.php \Drupal\system\Plugin\views\field\BulkForm::viewsFormValidate()

File

core/modules/system/src/Plugin/views/field/BulkForm.php, line 411
Contains \Drupal\system\Plugin\views\field\BulkForm.

Class

BulkForm
Defines a actions-based bulk operation form element.

Namespace

Drupal\system\Plugin\views\field

Code

public function viewsFormValidate(&$form, FormStateInterface $form_state) {
  $selected = array_filter($form_state
    ->getValue($this->options['id']));
  if (empty($selected)) {
    $form_state
      ->setErrorByName('', $this
      ->emptySelectedMessage());
  }
}