Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] "error_mapping" on child with "inherit_data" has no effect #8818

Open
@webmozart

Description

@webmozart

Given the following form:

$form = $factory->createBuilder()
    ->add('foo', null, array(
        'inherit_data' => true,
        'error_mapping' => array(
            'bar' => 'baz',
        ),
    ))
    ->getForm();

$form->get('foo')->add('baz');

then if a an error occcurs on the property path "bar", it won't be mapped to "baz", because the "error_mapping" setting on form "foo" (which inherits its parent data) is not regarded.

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