function views_ui_edit_view_form_validate
Same name in other branches
- 7.x-3.x includes/admin.inc \views_ui_edit_view_form_validate()
Validate that a view is complete and whole.
1 string reference to 'views_ui_edit_view_form_validate'
- views_ui_edit_view_form in includes/
admin.inc - The main edit view form, which is really just a save/cancel/delete button.
File
-
includes/
admin.inc, line 923
Code
function views_ui_edit_view_form_validate($form, &$form_state) {
// Do not validate cancel or delete or revert.
if (empty($form_state['clicked_button']['#value']) || $form_state['clicked_button']['#value'] != t('Save')) {
return;
}
$errors = $form_state['view']->validate();
if ($errors !== TRUE) {
foreach ($errors as $error) {
form_set_error('', $error);
}
}
}