function ViewsUiBaseViewsWizard::validate

Instantiates a view and validates values.

Overrides ViewsWizardInterface::validate

File

plugins/views_wizard/views_ui_base_views_wizard.class.php, line 954

Class

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

Code

public 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;
}