Fix fields and add warning on content too long
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Entity;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Repository\CommentRepository;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=CommentRepository::class)
|
||||
@@ -20,8 +21,12 @@ class Comment
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @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