function tmgmt_entity_ui_translate_form_validate in Translation Management Tool 7
Validation callback for the entity translation overview form.
1 string reference to 'tmgmt_entity_ui_translate_form_validate'
- tmgmt_entity_ui_translate_form in sources/
entity/ ui/ tmgmt_entity_ui.pages.inc - Entity translation overview form.
File
- sources/
entity/ ui/ tmgmt_entity_ui.pages.inc, line 101 - Provides page and form callbacks for the Translation Management Tool Entity Source User Interface module.
Code
function tmgmt_entity_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.'));
}
}