1 date_views_filter_handler.inc | date_views_filter_handler::extra_options_validate($form, &$form_state) |
Validate the options form.
Overrides date_views_filter_handler_simple::extra_options_validate
File
- core/
modules/ date/ views/ date_views_filter_handler.inc, line 112 - A flexible, configurable date filter. This filter combines multiple date filters into a single filter where all fields are controlled by the same date and can be combined with either AND or OR.
Class
- date_views_filter_handler
- @file A flexible, configurable date filter. This filter combines multiple date filters into a single filter where all fields are controlled by the same date and can be combined with either AND or OR.
Code
function extra_options_validate($form, &$form_state) {
$check_fields = array_filter($form_state['values']['options']['date_fields']);
if (empty($check_fields)) {
form_error($form['date_fields'], t('You must select at least one date field for this filter.'));
}
}