function date_views_filter_handler_simple::extra_options_validate in Date 8
Same name and namespace in other branches
- 7.3 date_views/includes/date_views_filter_handler_simple.inc \date_views_filter_handler_simple::extra_options_validate()
- 7.2 date_views/includes/date_views_filter_handler_simple.inc \date_views_filter_handler_simple::extra_options_validate()
1 method overrides date_views_filter_handler_simple::extra_options_validate()
- date_views_filter_handler::extra_options_validate in date_views/
includes/ date_views_filter_handler.inc
File
- date_views/
includes/ date_views_filter_handler_simple.inc, line 229 - A standard Views filter for a single date field, using Date API form selectors and sql handling.
Class
Code
function extra_options_validate($form, &$form_state) {
if (!preg_match('/^(?:\\-[0-9]{1,4}|[0-9]{4}):(?:[\\+|\\-][0-9]{1,4}|[0-9]{4})$/', $form_state['values']['options']['year_range'])) {
form_error($form['year_range'], t('Date year range must be in the format -9:+9, 2005:2010, -9:2010, or 2005:+9'));
}
}