title: Symfony 2.3.4 Implemented form not validated
body: <p>I have user model + user type, register model + register type... When i Execute it id doesn't validate user (inner data) model. Code below...</p>
  
  <p>User model:</p>
  
  <pre><code>use Doctrine\ORM\Mapping as ORM;
  use Symfony\Component\Validator\Constraints as Assert;
  use Symfony\Component\Security\Core\User\UserInterface;
  use Serializable;
  
  /**
   * User
   *
   * @ORM\Table(name="user")
   * @ORM\Entity(repositoryClass="Site\MainBundle\Entity\Repository\UserRepository")
   */
  class User implements UserInterface, Serializable
  {
      /**
       * @return array|\Symfony\Component\Security\Core\User\Role[]
       */
      public function getRoles()
      {
          return array('ROLE_USER');
      }
  
      /**
       *
       */
      public function eraseCredentials()
      {
  
      }
  
      /**
       * @return string
       */
      public function serialize()
      {
          return serialize(array($this-&gt;id));
      }
  
      /**
       * @param string $serialized
       */
      public function unserialize($serialized)
      {
          list ($this-&gt;id,) = unserialize($serialized);
      }
  
      /**
       *
       */
      public function __construct()
      {
          $this-&gt;isActive = false;
          $this-&gt;salt = md5(uniqid(null, true));
      }
  
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      public function getID()
      {
          return $this-&gt;id;
      }
  
      /**
       * @var string
       *
       * @ORM\Column(name="username", type="string", length=255, nullable=false)
       * @Assert\NotBlank(message="User name cannot be blank.")
       */
      private $username;
  
      public function setUserName($userName)
      {
          $this-&gt;username = $userName;
  
          return $this;
      }
  
      public function getUserName()
      {
          return $this-&gt;username;
      }
  
      /**
       * @var string
       *
       * @ORM\Column(name="password", type="string", length=255, nullable=false)
       * @Assert\NotBlank(message="Password cannot be blank.")
       */
      private $password;
  
      public function setPassword($password)
      {
          $this-&gt;password = $password;
  
          return $this;
      }
  
      public function getPassword()
      {
          return $this-&gt;password;
      }
  
      /**
       * @var string
       *
       * @ORM\Column(name="salt", type="string", length=255, nullable=false)
       */
      private $salt;
  
      public function setSalt($salt)
      {
          $this-&gt;salt = $salt;
  
          return $this;
      }
  
      public function getSalt()
      {
          return $this-&gt;salt;
      }
  
      /**
       * @var string
       *
       * @ORM\Column(name="email", type="string", length=255, nullable=false)
       * @Assert\NotBlank(message="E-Mail cannot be blank.")
       * @Assert\Email(message="Invalid email address.")
       */
      private $email;
  
      public function setEmail($email)
      {
          $this-&gt;email = $email;
  
          return $this;
      }
  
      public function getEmail()
      {
          return $this-&gt;email;
      }
  
      /**
       * @var bool
       *
       * @ORM\Column(name="isActive", type="boolean", nullable=false)
       */
      private $isActive;
  
      public function setIsActive($isActive)
      {
          $this-&gt;isActive = $isActive;
  
          return $this;
      }
  
      public function getIsActive()
      {
          return $this-&gt;isActive;
      }
  
  }
  </code></pre>
  
  <p>User Type:</p>
  
  <pre><code>use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  
  class UserType extends AbstractType
  {
      /**
       * @param FormBuilderInterface $builder
       * @param array                $options
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('username', 'text', array('label' =&gt; 'User name'))
              -&gt;add(
                  'password',
                  'repeated',
                  array(
                      'label' =&gt; 'Password',
                      'first_name' =&gt; 'password',
                      'second_name' =&gt; 'confirm',
                      'type' =&gt; 'password'
                  )
              )
              -&gt;add('email', 'text', array('label' =&gt; 'E-Mail'));
      }
  
      /**
       * @param OptionsResolverInterface $resolver
       */
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaults(
              array(
                  'data_class' =&gt; 'Site\MainBundle\Entity\User',
                  'required' =&gt; false
              )
          );
      }
  
      /**
       * @return string
       */
      public function getName()
      {
          return 'main_user';
      }
  }
  </code></pre>
  
  <p>Register model:</p>
  
  <pre><code>use Symfony\Component\Validator\Constraints as Assert;
  use Site\MainBundle\Entity\User;
  
  /**
   * Register
   */
  class Register
  {
      /**
       * @var Site\MainBundle\Entity\User
       *
       * @Assert\Type(type="Site\MainBundle\Entity\User")
       * @Assert\Valid()
       */
      protected $user;
  
      public function setUser(User $user)
      {
          $this-&gt;user = $user;
  
          return $this;
      }
  
      public function getUser()
      {
          return $this-&gt;user;
      }
  
      /**
       * @var boolean
       *
       * @Assert\NotBlank(message="No terms accepted.")
       * @Assert\True(message="You have to accept terms to be registered.")
       */
      protected $terms;
  
      public function setTerms($terms)
      {
          $this-&gt;terms = (Boolean)$terms;
  
          return $this;
  
      }
  
      public function getTerms()
      {
          return $this-&gt;terms;
      }
  }
  </code></pre>
  
  <p>Register Type:</p>
  
  <pre><code>use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  use Site\MainBundle\Form\UserType;
  
  class RegisterType extends AbstractType
  {
      /**
       * @param FormBuilderInterface $builder
       * @param array                $options
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('user', new UserType())
              -&gt;add('terms', 'checkbox');
      }
  
      /**
       * @param OptionsResolverInterface $resolver
       */
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaults(
              array(
                  'data_class' =&gt; 'Site\MainBundle\Entity\Register',
                  'required' =&gt; false
              )
          );
      }
  
      /**
       * @return string
       */
      public function getName()
      {
          return 'main_register';
      }
  }
  </code></pre>
  
  <p>And controller with twig. Part of twig:</p>
  
  <pre><code>{% block page_content %}
  
      &lt;form method="post" action="{{ path('main_register') }}"&gt;
          {{ form_errors(formRegister.user.username) }}
          {{ form_row(formRegister.user.username) }}
  
          {{ form_errors(formRegister.user.password.password) }}
          {{ form_row(formRegister.user.password.password) }}
  
          {{ form_errors(formRegister.user.password.confirm) }}
          {{ form_row(formRegister.user.password.confirm) }}
  
          {{ form_errors(formRegister.user.email) }}
          {{ form_row(formRegister.user.email) }}
  
          {{ form_errors(formRegister.terms) }}
          {{ form_row(formRegister.terms) }}
  
          &lt;button type="submit"&gt;Register&lt;/button&gt;
      &lt;/form&gt;
  
  {% endblock %}
  </code></pre>
  
  <p>Register Controller:</p>
  
  <pre><code>use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Site\MainBundle\Form\RegisterType;
  use Site\MainBundle\Entity\Register;
  
  /**
   * RegisterController
   */
  class RegisterController extends Controller
  {
      public function defaultAction()
      {
          $formRegister = $this-&gt;createForm(new RegisterType(), new Register());
  
          if ($this-&gt;getRequest()-&gt;isMethod('post')) {
              $formRegister-&gt;handleRequest($this-&gt;getRequest());
  
              if ($formRegister-&gt;isValid()) {
                  echo 'form is valid';
              }
          }
  
  
          $twig = 'SiteMainBundle:register:default.html.twig';
          $data = array(
              'formRegister' =&gt; $formRegister-&gt;createView()
          );
  
          return $this-&gt;render($twig, $data);
      }
  }
  </code></pre>
  
  <p>Where can be problem? Help please with it.</p>
  
  <p><strong>Updated</strong></p>
  
  <pre><code>echo "&lt;pre&gt;";
  echo $formRegister-&gt;getErrorsAsString();
  echo '&lt;/pre&gt;';
  </code></pre>
  
  <p>says:</p>
  
  <pre><code>user:
      username:
          No errors
      password:
          password:
              No errors
          confirm:
              No errors
      email:
          No errors
  terms:
      ERROR: No terms accepted.
      ERROR: You have to accept terms to be registered.
  </code></pre>
  
  <p>As you can see model User is not validated AT ALL... =\</p>