You are here

function views_node_access_plugin_access_node_type::options_validate in Views node access 7

Same name and namespace in other branches
  1. 6 views_node_access_plugin_access_node_type.inc \views_node_access_plugin_access_node_type::options_validate()

Provide the default form form for validating options.

Overrides views_plugin_access::options_validate

File

./views_node_access_plugin_access_node_type.inc, line 45
Views access plugin that provides node-type-based access control.

Class

views_node_access_plugin_access_node_type
@file Views access plugin that provides node-type-based access control.

Code

function options_validate(&$form, &$form_state) {
  if (!array_filter($form_state['values']['access_options']['node_types'])) {
    form_error($form['node_types'], t('You must select at least one node type'));
  }
}