public LanguageListBuilder::validateForm(array &$form, FormStateInterface $form_state)
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 DraggableListBuilder::validateForm
File
- core/modules/language/src/LanguageListBuilder.php, line 134
Class
- LanguageListBuilder
- Defines a class to build a listing of language entities.
Namespace
Drupal\language
Code
public function validateForm(array &$form, FormStateInterface $form_state) { if (!isset($this->entities[$form_state->getValue('site_default_language')])) { $form_state->setErrorByName('site_default_language', $this->t('Selected default language no longer exists.')); } }
Please login to continue.