You are here

function views_handler_filter_user_relationships_type::exposed_validate in User Relationships 7

Same name and namespace in other branches
  1. 6 user_relationship_views/views_handler_filter_user_relationships_type.inc \views_handler_filter_user_relationships_type::exposed_validate()

Validate the exposed handler form.

Overrides views_handler::exposed_validate

File

user_relationship_views/views_handler_filter_user_relationships_type.inc, line 52
User Relationships Views integration. Filter handler for relationship types, with autocomplete for type names. Modeled after views_handler_filter_user_name. @author Alex Karshakevich http://drupal.org/user/183217

Class

views_handler_filter_user_relationships_type
@file User Relationships Views integration. Filter handler for relationship types, with autocomplete for type names. Modeled after views_handler_filter_user_name. @author Alex Karshakevich http://drupal.org/user/183217

Code

function exposed_validate(&$form, &$form_state) {
  if (empty($this->options['exposed'])) {
    return;
  }
  if (empty($this->options['expose']['identifier'])) {
    return;
  }
  $identifier = $this->options['expose']['identifier'];
  $values = drupal_explode_tags($form_state['values'][$identifier]);
  $rtids = $this
    ->validate_type_strings($form[$identifier], $values);
  if ($rtids) {
    $this->validated_exposed_input = $rtids;
  }
}