8000 [Form] Choice loader is not validated against unknown choice(s) · Issue #23679 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Form] Choice loader is not validated against unknown choice(s) #23679
Closed
@ro0NL

Description

@ro0NL
Q A
Bug report? yes
Feature request? no
BC Break report? a bit?
RFC? no
Symfony version 3.2

While having this form wtih a language type and custom choice type, i noticed submitting an unknown value triggers a transformation value (thus form error) on the choice field but not for the language field.

This worked OK in 2.7

$form = $this->createFormBuilder(null, array('csrf_protection' => false)))
    ->add('a', LanguageType::class)
    ->add('b', ChoiceType::class, array('choices' => array(1,2,3)))
    ->getForm();
$form->handleRequest($request);
POST /
form[a]=x&form[b]=x

3.2
image

2.7
image

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

      0