1 views_ui_base_views_wizard.php ViewsUiBaseViewsWizard::validate($form, &$form_state)

Instantiates a view and validates values.

Overrides ViewsWizardInterface::validate

File

core/modules/views_ui/wizards/views_ui_base_views_wizard.php, line 924
Provides the interface and base class for Views Wizard plugins.

Class

ViewsUiBaseViewsWizard
A very generic Views Wizard class - can be constructed for any base table.

Code

function validate($form, &$form_state) {
  $view = $this->instantiate_view($form, $form_state);
  $errors = $view->validate();
  if (!is_array($errors) || empty($errors)) {
    $this->set_validated_view($form, $form_state, $view);
    return array();
  }
  return $errors;
}