1 views_plugin_style.inc | views_plugin_style::options_validate(&$form, &$form_state) |
Validate the options form.
Overrides views_plugin::options_validate
File
- core/
modules/ views/ plugins/ views_plugin_style.inc, line 286 - Definition of views_plugin_style.
Class
- views_plugin_style
- Base class to define a style plugin handler.
Code
function options_validate(&$form, &$form_state) {
// Don't run validation on style plugins without the grouping setting.
if (isset($form_state['values']['style_options']['grouping'])) {
// Don't save grouping if no field is specified.
foreach ($form_state['values']['style_options']['grouping'] as $index => $grouping) {
if (empty($grouping['field'])) {
unset($form_state['values']['style_options']['grouping'][$index]);
}
}
}
}