You are here

function tmgmt_node_ui_translate_form_validate in Translation Management Tool 7

Validation callback for the node translation overview form.

1 string reference to 'tmgmt_node_ui_translate_form_validate'
tmgmt_node_ui_node_form in sources/node/ui/tmgmt_node_ui.pages.inc
Node translation overview form. This form overrides the Drupal core or i18n Content Translation page with a tableselect form.

File

sources/node/ui/tmgmt_node_ui.pages.inc, line 92
Provides page and form callbacks for the Translation Management Tool Node Source User Interface module.

Code

function tmgmt_node_ui_translate_form_validate($form, &$form_state) {
  $selected = array_filter($form_state['values']['languages']);
  if (empty($selected)) {
    form_set_error('languages', t('You have to select at least one language for requesting a translation.'));
  }
}