diff --git a/src/Bundle/ChillMainBundle/Entity/NewsItem.php b/src/Bundle/ChillMainBundle/Entity/NewsItem.php index 6ca58afd1..7989d5545 100644 --- a/src/Bundle/ChillMainBundle/Entity/NewsItem.php +++ b/src/Bundle/ChillMainBundle/Entity/NewsItem.php @@ -66,6 +66,8 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface /** * @ORM\Column(type="date_immutable", nullable=false) * + * @Assert\NotNull + * * @Groups({"read"}) */ private ?\DateTimeImmutable $startDate = null; @@ -73,6 +75,8 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) * + * @Assert\GreaterThanOrEqual(propertyPath="startDate") + * * @Groups({"read"}) */ private ?\DateTimeImmutable $endDate = null;