1 views_handler_filter.inc views_handler_filter::expose_validate($form, &$form_state)

Validate the options form.

Overrides views_handler::expose_validate

File

core/modules/views/handlers/views_handler_filter.inc, line 587
@todo.

Class

views_handler_filter
Base class for filters.

Code

function expose_validate($form, &$form_state) {
  if (empty($form_state['values']['options']['expose']['identifier'])) {
    form_error($form['expose']['identifier'], t('The identifier is required if the filter is exposed.'));
  }

  if (!empty($form_state['values']['options']['expose']['identifier']) && $form_state['values']['options']['expose']['identifier'] == 'value') {
    form_error($form['expose']['identifier'], t('This identifier is not allowed.'));
  }

  if (!$this->view->display_handler->is_identifier_unique($form_state['id'], $form_state['values']['options']['expose']['identifier'])) {
    form_error($form['expose']['identifier'], t('This identifier is used by another handler.'));
  }
}