title: Symfony2 - why the integer value in the hidden field is not recognized as integer?
body: <p>I have a custom form type for a "<strong>Rating</strong>" entity in my Symfony2 project. It has a <strong>value</strong> field, that is <em>integer</em>. Then, I created the form for this entity. Here follows the code:</p>
  
  <pre><code>class RatingType extends AbstractType
  {
    public function buildForm(FormBuilder $builder, array $options){
       $builder-&gt;add('value', 'hidden', array('data' =&gt; 113));
    }
  
    public function getDefaultOptions(array $options){
       return array(
           'data_class' =&gt; 'Acme\ArticleBundle\Entity\Rating',
       );
    }    
  
    public function getName() {
       return 'spesax_productbundle_pratingtype';
    }
  }
  </code></pre>
  
  <p>When I press the <strong>submit</strong> button in my html page, the form is not validated and a "<strong>not an integer</strong>" error message is displayed on the screen!<br>
  Why Symfony2 doesn't cast the value <strong>113</strong> to integer?
  What can I do to solve this problem?</p>