public function LocaleSettingsForm::validateForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/locale/src/Form/LocaleSettingsForm.php \Drupal\locale\Form\LocaleSettingsForm::validateForm()
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormBase::validateForm
File
- core/
modules/ locale/ src/ Form/ LocaleSettingsForm.php, line 94 - Contains \Drupal\locale\Form\LocaleSettingsForm.
Class
- LocaleSettingsForm
- Configure locale settings for this site.
Namespace
Drupal\locale\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
parent::validateForm($form, $form_state);
if (empty($form['#translation_directory']) && $form_state
->getValue('use_source') == LOCALE_TRANSLATION_USE_SOURCE_LOCAL) {
$form_state
->setErrorByName('use_source', $this
->t('You have selected local translation source, but no <a href=":url">Interface translation directory</a> was configured.', array(
':url' => $this
->url('system.file_system_settings'),
)));
}
}