You are here

public function simple_access_views_plugin_group::options_validate in Simple Access 7.2

Same name and namespace in other branches
  1. 6.2 views/simple_access_views_plugin_group.inc \simple_access_views_plugin_group::options_validate()

Validate the options form.

Overrides views_plugin_access::options_validate

File

views/simple_access_views_plugin_group.inc, line 76
Views access plugin to make use of cimple access.

Class

simple_access_views_plugin_group
@file Views access plugin to make use of cimple access.

Code

public function options_validate(&$form, &$form_state) {
  if (!array_filter($form_state['values']['access_options']['groups'])) {
    form_error($form['role'], t('You must select at least one group if type is "by group"'));
  }
}