We should create a new UniqueFieldNodeEvent event that will be dispatched when the validation for nodes 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-3570256
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 #2
astonvictor commentedComment #5
shubham_pareek_19 commentedComment #6
shubham_pareek_19 commentedi have removed event subscriber.
Comment #7
smovs commentedComment #8
smovs commentedFixed merge conflicts and reviewed. The event is dispatched as expected
Comment #9
astonvictor commented