title: Symfony2 form validation
body: <p>In my entity, I have a field like : </p>
  
  <pre><code>/**
   * @var decimal $Size
   *
   * @ORM\Column(name="Size", type="decimal", scale="2")
   * @Assert\NotBlank()
   * @Assert\Type(type="numeric")
   */
  private $Size;
  </code></pre>
  
  <p>But when I type a string, like 'foo' in the creation form, the function bindRequest throws :</p>
  
  <pre><code>Expected argument of type "numeric", "boolean" given
  500 Internal Server Error - UnexpectedTypeException
  </code></pre>
  
  <p>The controller code is :</p>
  
  <pre><code>$request = $this-&gt;get('request');
  if ($request-&gt;getMethod() == 'POST')
  {           
       $form-&gt;bindRequest($request);   
       if ($form-&gt;isValid())
       {
           $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
           $em-&gt;persist($support);
           $em-&gt;flush();
  
           return $this-&gt;redirect($this-&gt;generateUrl('mediatheque_support_' . $shortcut . '_list'));
        }
   }
  </code></pre>
  
  <p>Any ideas ?</p>
  
  <p>Thanks</p>