FormValidator::finalizeValidation

protected FormValidator::finalizeValidation(&$form, FormStateInterface &$form_state, $form_id)

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.

File

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

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();
}
doc_Drupal
2016-10-29 09:16:53
Comments
Leave a Comment

Please login to continue.