EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Form errors not displayed when entering bad value in CollectionField (made of MoneyType)

Open fallais opened this issue 3 years ago • 1 comments

Describe the bug The form errors are not displayed when entering a bad value in CollectionField (collection of MoneyType), I tried to set it as required, to see if it causes the issue, but not.

Field is configured as follow : $price = CollectionField::new('price', 'Prix')->setEntryType(MoneyType::class)->setDefaultColumns('col-md-3');

We can see that there is an error, but there is nothing in form.vars.errors

image image

But the error exists

image

So this block does not do anything :

{% block form_errors %}
    {% if errors|length > 0 %}
        {% for error in errors %}
            <div class="{{ attr.class|default('') }} invalid-feedback d-block">{{ error.message }}</div>
        {% endfor %}
    {% endif %}
{% endblock form_errors %}

fallais avatar Dec 01 '21 13:12 fallais