function views_handler_field_watchdog_severity::options_validate in Views Watchdog 7.3
Same name and namespace in other branches
- 6.3 views/handlers/views_handler_field_watchdog_severity.inc \views_handler_field_watchdog_severity::options_validate()
- 6 views/handlers/views_handler_field_watchdog_severity.inc \views_handler_field_watchdog_severity::options_validate()
- 6.2 views/handlers/views_handler_field_watchdog_severity.inc \views_handler_field_watchdog_severity::options_validate()
Validate the options form.
Overrides views_handler::options_validate
File
- views/
handlers/ views_handler_field_watchdog_severity.inc, line 54 - Views field handler for the views_watchdog module.
Class
- views_handler_field_watchdog_severity
- Provides severity display options for the watchdog entry.
Code
function options_validate(&$form, &$form_state) {
parent::options_validate($form, $form_state);
foreach (_views_watchdog_get_severity() as $key => $value) {
$path = trim($form_state['values']['options']['watchdog_severity_icon_' . $value['arg']]);
if (!empty($path) && !is_file($path)) {
$field = $form['watchdog_severity_icon_' . $value['arg']];
form_error($field, t("File doesn't exist."));
}
}
}