You are here

public function uc_addresses_views_access::options_validate in Ubercart Addresses 6.2

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

Implements views_plugin#options_validate().

Checks if at least one argument is selected.

@todo Implement!

File

views/uc_addresses_views_access.inc, line 116
Contains uc_addresses_views_access class.

Class

uc_addresses_views_access
Access plugin that provides access control based on custom PHP code.

Code

public function options_validate(&$form, &$form_state) {
  $option_values = $form_state['values']['access_options'];
  if (empty($option_values['uid_argument']) && empty($option_values['aid_argument'])) {
    form_set_error('access_options][uid_argument', t('Please select at least one argument.'));
    form_set_error('access_options][aid_argument');
  }
}