Add FormState::unsetErrorByName function

Created on 21 January 2016, over 8 years ago
Updated 29 July 2024, about 1 month ago

Problem/Motivation

There is no way to remove error messages created by FormState::setError.

Proposed resolution

Add the FormState::unsetErrorByName interface function, base class function, and implementation.
Add PHPUnit test.

Remaining tasks

User interface changes

None, aside from the ability to remove error messages.

API changes

Additional interface function in /core/lib/Drupal/Core/Form/FormStateInterface.php
Additional function in /core/lib/Drupal/Core/Form/FormStateDecoratorBase.php
Additional function in /core/lib/Drupal/Core/Form/FormState.php

Data model changes

None

Issue related to the D7 task.
https://www.drupal.org/node/2653676

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Form 

Last updated less than a minute ago

Created by

🇧🇷Brazil felribeiro

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024