You are here

function ViewsUiBaseViewsWizard::validate in Views (for Drupal 7) 7.3

Instantiates a view and validates values.

Overrides ViewsWizardInterface::validate

File

plugins/views_wizard/views_ui_base_views_wizard.class.php, line 916
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;
}