Fix fields and add warning on content too long
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Entity\Document;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Repository\AnnounceRepository;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=AnnounceRepository::class)
|
||||
@@ -13,8 +14,12 @@ use Gedmo\Mapping\Annotation as Gedmo;
|
||||
class Announce extends Document
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
* @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