validation adjusted to greaterThanOrEqual and different message passed

This commit is contained in:
2022-02-01 13:51:21 +01:00
parent de1dddbb85
commit c3de3c6c39
2 changed files with 6 additions and 1 deletions

View File

@@ -133,7 +133,11 @@ class AccompanyingPeriod implements
* @ORM\Column(type="date", nullable=true)
* @Groups({"read", "write", "docgen:read"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CLOSED})
* @Assert\GreaterThan(propertyPath="openingDate", groups={AccompanyingPeriod::STEP_CLOSED})
* @Assert\GreaterThanOrEqual(
* propertyPath="openingDate",
* groups={AccompanyingPeriod::STEP_CLOSED},
* message="The closing date must be later than the date of creation"
* )
*/
private ?DateTime $closingDate = null;