You are here

public function FormStateDecoratorBase::clearErrors in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Form/FormStateDecoratorBase.php \Drupal\Core\Form\FormStateDecoratorBase::clearErrors()
  2. 10 core/lib/Drupal/Core/Form/FormStateDecoratorBase.php \Drupal\Core\Form\FormStateDecoratorBase::clearErrors()

Clears all errors against all form elements made by self::setErrorByName().

Overrides FormStateInterface::clearErrors

File

core/lib/Drupal/Core/Form/FormStateDecoratorBase.php, line 642

Class

FormStateDecoratorBase
Decorates another form state.

Namespace

Drupal\Core\Form

Code

public function clearErrors() {
  $this->decoratedFormState
    ->clearErrors();
}