Problem/Motivation

Hi, I'm using inline_entity_form module and Youtube module in a project.
Actually, the Youtube input is validated with #element_validate (function validateInput()) but doesn't seems to work through inline_entity_form because we don't use the form_state->setError().

Proposed resolution

I don't understand why we use $form_state->setErrorByName() instead of $form_state->setError() in the validateInput.
I suggest if it's possible to replace the setErrorByName by setError, to inline_entity_form will works fine with the youtube module.

Comments

jeanfei created an issue. See original summary.

jeanfei’s picture

Status: Active » Needs review
StatusFileSize
new693 bytes

Here the patch if it's ok to change the validation callback.

woprrr’s picture

@jeanfei This patch work a charm :) Thx. +1

  • guschilds committed 45651b0 on 8.x-1.x authored by jeanfei
    Issue #2584945 by jeanfei: Use setError instead of setErrorByName in...
guschilds’s picture

Status: Needs review » Fixed

The patch from #3 has been committed to the 8.x-1.x branch. Thanks for your help!

woprrr’s picture

Awesome Thanks lot @guschilds

Status: Fixed » Closed (fixed)

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