More improvements on constraints

This commit is contained in:
Cyril 2019-10-31 17:25:54 +01:00
parent fcdefffaad
commit 3e57b82a39
2 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,7 @@ class CalendarInstance
/**
* @ORM\Column(name="calendarcolor", type="binary", length=10, nullable=true)
* @Assert\Regex("/\#[0-9]{6}/")
*/
private $calendarColor;

View File

@ -3,6 +3,7 @@
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="schedulingobjects")
@ -29,6 +30,7 @@ class SchedulingObject
/**
* @ORM\Column(type="binary", length=255, nullable=true)
* @Assert\Regex("/[0-9a-z\-]+/")
*/
private $uri;