$errors[] = t('The operator is invalud');
}
if (is_array($this->value)) {
+ if (!isset($this->value_options)) {
+ // Don't validate if there are none value options provided, for example for special handlers.
+ return $errors;
+ }
+ if ($this->options['exposed'] && !$this->options['expose']['required'] && empty($this->value)) {
+ // Don't validate if the field is exposed and no default value is provided.
+ return $errors;
+ }
+
// Remove every element which is not known.
foreach ($this->value as $value) {
if (!isset($this->value_options[$value])) {
}
}
- function validate() {
- // Override the validation handler defined by filter_in_operator and do nothing.
- // @todo: Someone could refactor this handler to support get_value_options and do some custom validation for the autocompletion here.
- }
-
function value_validate($form, &$form_state) {
// We only validate if they've chosen the text field style.
if ($this->options['type'] != 'textfield') {