title: Validation doesn't work on relation fields
body: <p>I have OnetoOne relation between Users and Files, The problém is that every time i post a new file  via embed form the validiation does not work .<br>
  I tried this solution mentioned in symfony <a href="http://symfony.com/doc/master/reference/constraints/Valid.html" rel="nofollow noreferrer">doc </a>To prevent validation on objects that are <strong> embedded </strong>as properties on an object being validated we need to add @Assert\Valid in the first filed.<br>
  Also i tried to validate even a string not a file and this didnt work.
  <br>By the way any validation  mentioned in Users class, works fine.<br>
  Files.php</p>
  
  <pre><code>&lt;?php
  
  namespace AppBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Component\HttpFoundation\File\File;
  use Vich\UploaderBundle\Mapping\Annotation as Vich;
  use Symfony\Component\Validator\Constraints as Assert;
  use Symfony\Component\Validator\Context\ExecutionContextInterface;
  
  /**
   * Files
   * @ORM\Table(name="files")
   * @ORM\Entity(repositoryClass="AppBundle\Repository\FilesRepository")
   *
   * @Vich\Uploadable
   */
  class Files implements \Serializable
  {
      /**
       * @var int
       * 
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
  
      /**
   * 
   * @Assert\NotBlank()
   * @Assert\File(
   *     maxSize = "1024k",
   *     mimeTypes = {"application/pdf", "application/x-pdf"},
   *     mimeTypesMessage = "Please upload a valid PDF"
   * )
   * @Assert\File(maxSize="1M")
   * @Vich\UploadableField(mapping="upload_files", fileNameProperty="imageName", size="imageSize")
   * 
   * @var File
   */
  protected $imageFile;
  
      /**
       * @ORM\Column(type="string", length=255)
       * 
       * @var string
       */
      protected $imageName;
  
      /**
       * @ORM\Column(type="datetime")
       *
       * @var string
       */
      protected $updatedAt;
      /**
       * @ORM\Column(type="datetime")
       *
       * @var string
       */
      protected $createdAt;
      public function getId()
      {
          return $this-&gt;id;
      }
  
  
  
  
  
      /**
       *
       * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $image
       *
       * 
       */
      public function setImageFile(File $image = null)
      {
          $this-&gt;imageFile = $image;
          $this-&gt;createdAt = new \DateTimeImmutable();
  
          if ($image) {
              // It is required that at least one field changes if you are using doctrine
              // otherwise the event listeners won't be called and the file is lost
              $this-&gt;updatedAt = new \DateTimeImmutable();
          }
  
          return $this;
      }
  
      /**
       * @return File|null
       */
      public function getImageFile()
      {
          return $this-&gt;imageFile;
      }
  
      /**
       * @param string $imageName
       *
       * 
       */
      public function setImageName($imageName)
      {
          $this-&gt;imageName = $imageName;
  
          return $this;
      }
  
      /**
       * @return string|null
       */
      public function getImageName()
      {
          return $this-&gt;imageName;
      }
  
    /** @see \Serializable::serialize() */
      public function serialize()
      {
          return serialize(array(
              $this-&gt;id,
              $this-&gt;imageName,
  
          ));
      }
  
      /** @see \Serializable::unserialize() */
      public function unserialize($serialized)
      {
          list (
              $this-&gt;id,
  
          ) = unserialize($serialized);
      }
  
      /**
       * @return string
       */
      public function getUpdatedAt()
      {
          return $this-&gt;updatedAt;
      }
  
      /**
       * @param string $updatedAt
       */
      public function setUpdatedAt($updatedAt)
      {
          $this-&gt;updatedAt = $updatedAt;
      }
  
  
  }
  </code></pre>
  
  <p>Users.php </p>
  
  <pre><code>&lt;?php
  
  namespace AppBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface;
  use HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider as BaseClass;
  use Symfony\Component\Security\Core\User\UserInterface;
  use HWI\Bundle\OAuthBundle\Security\Core\User\OAuthUser;
  use Symfony\Component\Validator\Constraints as Assert;
  
  
  /**
   * Users 
   * @ORM\Table(name="users")
   * @ORM\Entity(repositoryClass="AppBundle\Repository\UsersRepository")
   *
   */
  class Users extends  OAuthUser 
  {
      /**
       * @var int
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
      /**
       * 
       * @ORM\OneToOne(targetEntity="AppBundle\Entity\Files",cascade={"persist"})
       * @ORM\JoinColumn(name="file_id", referencedColumnName="id")
       */
      public $cv;
  </code></pre>
  
  <p>UsersType.php</p>
  
  <pre><code>class UsersType extends AbstractType
  {
      /**
       * {@inheritdoc}
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder-&gt;
  -&gt;add('cv',FilesType::class)
  </code></pre>
  
  <p>FilesType.php</p>
  
  <pre><code>    /**
       * {@inheritdoc}
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder -&gt;
      add('imageFile',
  
  
   VichFileType::class, [
              'required' =&gt; false,
              'allow_delete' =&gt; true, 
              'download_link' =&gt; true,
              'label' =&gt; false, 
  
          ]);
  
  
  
  }
  </code></pre>