Fix fields and add warning on content too long

This commit is contained in:
Xbird
2022-10-01 22:55:58 +00:00
parent 1a38d3e854
commit f815cfa58a
30 changed files with 681 additions and 597 deletions

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\MedicalRepository;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=MedicalRepository::class)
@@ -19,8 +20,12 @@ class Medical extends Document
private $directory;
/**
* @ORM\Column(type="text")
* @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/
private $content;