public function ConfigSourcePluginUi::overviewFormValidate in Translation Management Tool 8
Overrides SourcePluginUiBase::overviewFormValidate
File
- sources/
tmgmt_config/ src/ ConfigSourcePluginUi.php, line 254
Class
- ConfigSourcePluginUi
- Config source plugin UI.
Namespace
Drupal\tmgmt_configCode
public function overviewFormValidate(array $form, FormStateInterface $form_state, $type) {
$target_language = $form_state
->getValue(array(
'search',
'target_language',
));
if (!empty($target_language) && $form_state
->getValue(array(
'search',
'langcode',
)) == $target_language) {
$form_state
->setErrorByName('search[target_language]', $this
->t('The source and target languages must not be the same.'));
}
}