function Display::validateForm

Same name in other branches
  1. 8.9.x core/modules/views_ui/src/Form/Ajax/Display.php \Drupal\views_ui\Form\Ajax\Display::validateForm()
  2. 10 core/modules/views_ui/src/Form/Ajax/Display.php \Drupal\views_ui\Form\Ajax\Display::validateForm()
  3. 11.x core/modules/views_ui/src/Form/Ajax/Display.php \Drupal\views_ui\Form\Ajax\Display::validateForm()

Overrides ViewsFormBase::validateForm

File

core/modules/views_ui/src/Form/Ajax/Display.php, line 95

Class

Display
Provides a form for editing the Views display.

Namespace

Drupal\views_ui\Form\Ajax

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
    $view = $form_state->get('view');
    $display_id = $form_state->get('display_id');
    $view->getExecutable()->displayHandlers
        ->get($display_id)
        ->validateOptionsForm($form['options'], $form_state);
    if ($form_state->getErrors()) {
        $form_state->set('rerender', TRUE);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.