function FormStateInterface::getErrors

Same name in other branches
  1. 9 core/lib/Drupal/Core/Form/FormStateInterface.php \Drupal\Core\Form\FormStateInterface::getErrors()
  2. 8.9.x core/lib/Drupal/Core/Form/FormStateInterface.php \Drupal\Core\Form\FormStateInterface::getErrors()
  3. 10 core/lib/Drupal/Core/Form/FormStateInterface.php \Drupal\Core\Form\FormStateInterface::getErrors()

Returns an associative array of all errors.

Return value

array An array of all errors, keyed by the name of the form element.

2 methods override FormStateInterface::getErrors()
FormState::getErrors in core/lib/Drupal/Core/Form/FormState.php
Returns an associative array of all errors.
FormStateDecoratorBase::getErrors in core/lib/Drupal/Core/Form/FormStateDecoratorBase.php

File

core/lib/Drupal/Core/Form/FormStateInterface.php, line 569

Class

FormStateInterface
Provides an interface for an object containing the current state of a form.

Namespace

Drupal\Core\Form

Code

public function getErrors();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.