Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Form/FormValidator.php \Drupal\Core\Form\FormValidator::finalizeValidation()
  2. 9 core/lib/Drupal/Core/Form/FormValidator.php \Drupal\Core\Form\FormValidator::finalizeValidation()

Finalizes validation.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

string $form_id: The unique string identifying the form.

1 call to FormValidator::finalizeValidation()
FormValidator::validateForm in core/lib/Drupal/Core/Form/FormValidator.php

File

core/lib/Drupal/Core/Form/FormValidator.php, line 197

Class

FormValidator
Provides validation of form submissions.

Namespace

Drupal\Core\Form

Code

protected function finalizeValidation(&$form, FormStateInterface &$form_state, $form_id) {

  // Delegate handling of form errors to a service.
  $this->formErrorHandler
    ->handleFormErrors($form, $form_state);

  // Mark this form as validated.
  $form_state
    ->setValidationComplete();
}