You are here

public function SiteConfigureForm::validateForm in Configuration installer 8

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

src/Form/SiteConfigureForm.php, line 197

Class

SiteConfigureForm
Updates the user 1 account.

Namespace

Drupal\config_installer\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  if ($error = user_validate_name($form_state
    ->getValue([
    'account',
    'name',
  ]))) {
    $form_state
      ->setErrorByName('account][name', $error);
  }
}