start to simplify validation groups for person

This commit is contained in:
2021-12-16 21:21:40 +01:00
parent 6296c7a307
commit 14aab637eb
2 changed files with 9 additions and 16 deletions

View File

@@ -153,12 +153,8 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* @var DateTime
*
* @ORM\Column(type="date", nullable=true)
* @Assert\Date(
* groups={"general", "creation"}
* )
* @Birthdate(
* groups={"general", "creation"}
* )
* @Assert\Date
* @Birthdate
*/
private $birthdate;
@@ -241,9 +237,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* @var DateTimeImmutable
*
* @ORM\Column(type="date_immutable", nullable=true)
* @Assert\Date(
* groups={"general", "creation"}
* )
* @Assert\Date
* @Assert\GreaterThanOrEqual(propertyPath="birthdate")
* @Assert\LessThanOrEqual("today")
*/