You are here

function entity_share_ui_share_action_form_validate in Entity Share 7

Validate the submitted datas.

Parameters

array $form: The form array.

array $form_state: The form state.

1 string reference to 'entity_share_ui_share_action_form_validate'
entity_share_ui_share_action_form in modules/entity_share_ui/modules/entity_share_ui_client/entity_share_ui_client.share.admin.inc
Form generation.

File

modules/entity_share_ui/modules/entity_share_ui_client/entity_share_ui_client.share.admin.inc, line 180
Entity Share UI Client Admin Share file.

Code

function entity_share_ui_share_action_form_validate(array $form, array &$form_state) {
  if (empty($form_state['values']['nids'])) {
    form_set_error('', t('No nid items selected.'));
  }
  $endpoints = array_filter($form_state['values']['endpoints']);
  if (empty($endpoints)) {
    form_set_error('', t('No endpoint was selected.'));
  }
}