public function views_handler_filter_boolean_operator::value_validate in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 handlers/views_handler_filter_boolean_operator.inc \views_handler_filter_boolean_operator::value_validate()
- 6.2 handlers/views_handler_filter_boolean_operator.inc \views_handler_filter_boolean_operator::value_validate()
Validate the options form.
Overrides views_handler_filter::value_validate
File
- handlers/
views_handler_filter_boolean_operator.inc, line 149 - Definition of views_handler_filter_boolean_operator.
Class
- views_handler_filter_boolean_operator
- Simple filter to handle matching of boolean values
Code
public function value_validate($form, &$form_state) {
if ($form_state['values']['options']['value'] == 'All' && !empty($form_state['values']['options']['expose']['required'])) {
form_set_error('value', t('You must select a value unless this is an non-required exposed filter.'));
}
}