Symfony重复断言可能吗?

Could an approach like this work? I would test it but thats for another task...

/**
 * @ORM\Column(type="string", length=255, nullable=true)
 *
 * @Assert\NotBlank(message="Bitte wählen sie eine valide Datei.", groups={"textimage", "video"})
 * @Assert\File(mimeTypes={ "video/mp4" }, groups={"video"})
 * @Assert\File(mimeTypes={ "image/jpeg" }, groups={"textimage"})
 */
private $media;

So I have one media property on the entity which should work for two different types of media - seperated by validation groups.

Would be nice if this would work - anyone knows that? If not whats the correct approach for that?