We should create a new UniqueFieldTermEvent event that will be dispatched when the validation for terms has failed. We should pass the field name and submitted value to the event as arguments.
i.e., after adding a new error $form_state->setErrorByName()

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

astonvictor created an issue. See original summary.

shubham_pareek_19 made their first commit to this issue’s fork.

shubham_pareek_19’s picture

Status: Active » Needs review
boddy’s picture

Assigned: Unassigned » boddy
boddy’s picture

Assigned: boddy » Unassigned
Status: Needs review » Reviewed & tested by the community

Created an additional field 'field_text', set Unique Field restrictions Term Name, Term Description, 'field_text' for Tags vocabulary.
Added the first Term, tried to add the second one with the same values for those fields.
Each time the UniqueFieldTermEvent event was dispatched successfully.

RTBC

astonvictor’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.