public function SiteConfigureForm::validateForm in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php \Drupal\Core\Installer\Form\SiteConfigureForm::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/
lib/ Drupal/ Core/ Installer/ Form/ SiteConfigureForm.php, line 284
Class
- SiteConfigureForm
- Provides the site configuration form.
Namespace
Drupal\Core\Installer\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
if ($error = user_validate_name($form_state
->getValue([
'account',
'name',
]))) {
$form_state
->setErrorByName('account][name', $error);
}
}