Skip to content

error_bubbling doesn't work properly with inherit_data #14441

Closed
@maximecolin

Description

@maximecolin
class MyType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
         $builder->add('range', new DateRange(), ['inherit_data' => true']);
    }
}
class DateRange extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
         $builder
              ->add('from', 'date', ['error_bubbling' => true])
              ->add('to', 'date', ['error_bubbling' => true]);
    }
}

I expect error on from bubbles to parent range field but it bubbles to the root form.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions