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()
Issue fork unique_field-3570257
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
Comment #4
shubham_pareek_19 commentedComment #5
boddy commentedComment #6
boddy commentedCreated 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
Comment #7
astonvictor commented