You are here

function access_admin_grants_validate in Access Control Kit 7

Form validation handler for access_admin_grants().

See also

access_admin_grants()

access_admin_grants_submit()

1 string reference to 'access_admin_grants_validate'
access_admin_grants in ./access_grants.admin.inc
Form constructor for the grant admin form.

File

./access_grants.admin.inc, line 139
Access grants administrative UI for the access control kit module.

Code

function access_admin_grants_validate($form, &$form_state) {

  // Error if there are no items to select.
  if (!is_array($form_state['values']['grants']) || !count(array_filter($form_state['values']['grants']))) {
    form_set_error('', t('No items selected.'));
  }
}