title: Symfony 4.2 Form is not submitted or not valid
body: <p>I followed the symfony 4.2 documentation, but it seems the form is not submitted...</p>
  
  <p>I spent my whole sunday, but it seems a secret how does it works, in the logs I do not see any errors.</p>
  
  <p>So start it. the config contains these settings:</p>
  
  <pre><code>framework:
      validation:
          email_validation_mode: 'html5'
          enable_annotations: true
  </code></pre>
  
  <p>Here the entity:</p>
  
  <pre><code>namespace App\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Component\Validator\Constraints as Assert;
  
  /**
   * @ORM\Entity(repositoryClass="App\Repository\FeedbackRepository")
   */
  class Feedback extends BaseEntity
  {
      /**
       * @ORM\Id()
       * @ORM\GeneratedValue()
       * @ORM\Column(type="integer")
       */
      private $id;
  
      /**
       * @ORM\Column(type="string", length=255)
       * @Assert\Type("string")
       * @Assert\NotBlank
       */
      private $name;
  
      /**
       * @ORM\Column(type="string", length=255)
       * @Assert\Type("string")
       * @Assert\Email()
       * @Assert\NotBlank
       */
      private $email;
  </code></pre>
  
  <p>AS you can see I use the Assert annotations for the validations.</p>
  
  <p>So here the formtype:</p>
  
  <pre><code>class FeedbackType extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('name', TextType::class)
              -&gt;add('email', EmailType::class)
          ;
      }
  
      public function configureOptions(OptionsResolver $resolver)
      {
          $resolver-&gt;setDefaults([
              'data_class' =&gt; Feedback::class,
              // enable/disable CSRF protection for this form
              'csrf_protection' =&gt; true,
              // the name of the hidden HTML field that stores the token
              'csrf_field_name' =&gt; '_token',
          ]);
      }
  }
  </code></pre>
  
  <p>Maybe the problem with the token, but I do not know exactly.</p>
  
  <p>Now let see the view:</p>
  
  <pre><code> &lt;form action="{{ path('feedback') }}" type="POST"&gt;
                          &lt;div class="input-field"&gt;
                              &lt;i class="material-icons prefix"&gt;account_circle&lt;/i&gt;
                              {{ form_label(feedback.name) }}
                              {{ form_widget(feedback.name) }}
                          &lt;/div&gt;
                          &lt;div class="input-field"&gt;
                              &lt;i class="material-icons prefix"&gt;email&lt;/i&gt;
                              {{ form_label(feedback.email) }}
                              {{ form_widget(feedback.email) }}
                          &lt;/div&gt;
  {{ form_widget(feedback._token) }}
  </code></pre>
  
  <p>Next, here the controller which get the request.</p>
  
  <pre><code>/**
   * @Route("/feedback", name="feedback", methods="GET|POST")
   */
  public function feedbackFormAction(Request $request, EntityManagerInterface $entityManager): JsonResponse
  {
      $feedbackForm = new Feedback();
  
      $form = $this-&gt;createForm(FeedbackType::class, $feedbackForm);
      $form-&gt;handleRequest($request);
      dump($request);
      dump($feedbackForm);
  
      if ($form-&gt;isSubmitted() &amp;&amp; $form-&gt;isValid()) {
          $entityManager-&gt;persist($feedbackForm);
          $entityManager-&gt;flush();
      } else {
          $errors = $this-&gt;getErrorsFromForm($form);
          dump($form);die;
          return new JsonResponse(['data' =&gt; ['result' =&gt; 'failed', 'errors' =&gt; $errors]]);
      }
      return new JsonResponse(['data' =&gt; ['result' =&gt; 'success']]);
  }
  </code></pre>
  
  <p>The errors give me an empty array in Json format.
  If I check the <code>dump($feedbackForm)</code> I see that the <code>submitted</code> property is false. and the <code>modeldata</code>, <code>viewdata</code> and <code>normdata</code> values are null... But how is this possible?</p>
  
  <p>Dumping request:</p>
  
  <pre><code>query: ParameterBag {#16 ▼
      #parameters: array:1 [▼
        "feedback" =&gt; array:11 [▼
          "name" =&gt; "a"
          "email" =&gt; "a@a.a"
          "_token" =&gt; "NJHBv7NpwYlugFcU-sE0qoBEQkS38yhxOjbklkHu8j0"
        ]
      ]
    }
  </code></pre>
  
  <p>I think, this is correct.</p>