add validation of existing file

This commit is contained in:
2018-06-07 16:54:13 +02:00
parent 299491cb5b
commit fcc74c993d
11 changed files with 75 additions and 8 deletions

View File

@@ -6,7 +6,8 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\User;
use ChampsLibres\AsyncUploaderBundle\Validator\Constraints\AsyncFileExists;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\MappedSuperclass()
@@ -22,6 +23,9 @@ class Document implements HasScopeInterface
/**
* @ORM\Column(type="text")
* @Assert\Length(
* min=2, max=250
* )
*/
private $title;
@@ -44,6 +48,7 @@ class Document implements HasScopeInterface
* targetEntity="Chill\DocStoreBundle\Entity\StoredObject",
* cascade={"persist"}
* )
* @Assert\Valid()
*/
private $object;