function views_plugin_style_watchdog_table::options_validate in Views Watchdog 6
Same name and namespace in other branches
- 6.3 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_validate()
- 6.2 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_validate()
- 7.3 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_validate()
File
- views/
plugins/ views_plugin_style_watchdog_table.inc, line 50 - Views callbacks for the "Views watchdog" module.
Class
Code
function options_validate(&$form, &$form_state) {
parent::options_validate($form, $form_state);
foreach (views_watchdog_get_severity() as $key => $value) {
$class = trim($form_state['values']['style_options']['watchdog_table_severity_' . $value['arg']]);
$field = $form['watchdog_table_severity_' . $value['arg']];
if (preg_match('/[^a-zA-Z0-9-]/', $class)) {
form_error($field, t('CSS class name must be alphanumeric or dashes only.'));
}
}
}