Fix fields and add warning on content too long
This commit is contained in:
@@ -8,6 +8,7 @@ use App\Repository\FolderRepository;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=FolderRepository::class)
|
||||
@@ -15,8 +16,12 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
class Folder extends Document
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
* @ORM\Column(type="text", length=65535)
|
||||
* @Gedmo\Versioned
|
||||
* @Assert\Length(
|
||||
* max=65535,
|
||||
* maxMessage="Content too long : {{ limit }} max"
|
||||
* )
|
||||
*/
|
||||
private $content;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user