You are here

function views_ui_wizard_form_validate in Views (for Drupal 7) 7.3

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

Validate the add view form.

1 string reference to 'views_ui_wizard_form_validate'
views_ui_add_form in includes/admin.inc
Form builder for the "add new view" page.

File

includes/admin.inc, line 704
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;
  $get_instance = $wizard['get_instance'];
  $form_state['wizard_instance'] = $get_instance($wizard);
  $errors = $form_state['wizard_instance']
    ->validate($form, $form_state);
  foreach ($errors as $name => $message) {
    form_set_error($name, $message);
  }
}