You are here

function views_ui_wizard_form_validate in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 7.3 includes/admin.inc \views_ui_wizard_form_validate()

Validate the add view form.

1 string reference to 'views_ui_wizard_form_validate'
ViewUI::buildAddForm in views_ui/lib/Drupal/views_ui/ViewUI.php

File

views_ui/admin.inc, line 312
Provides the Views' administrative interface.

Code

function views_ui_wizard_form_validate($form, &$form_state) {
  $wizard = views_ui_get_wizard($form_state['values']['show']['wizard_key']);
  $form_state['wizard'] = $wizard;
  $form_state['wizard_instance'] = views_get_plugin('wizard', $wizard['id']);
  $errors = $form_state['wizard_instance']
    ->validateView($form, $form_state);
  foreach ($errors as $name => $message) {
    form_set_error($name, $message);
  }
}