diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index 1b79ba867..3f18fe5f6 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -216,13 +216,12 @@ final class PersonController extends AbstractController ); } - $form = $this->createForm(CreationPersonType::class, $person, [ - 'validation_groups' => ['create'], - ])->add('editPerson', SubmitType::class, [ - 'label' => 'Add the person', - ])->add('createPeriod', SubmitType::class, [ - 'label' => 'Add the person and create an accompanying period', - ]); + $form = $this->createForm(CreationPersonType::class, $person) + ->add('editPerson', SubmitType::class, [ + 'label' => 'Add the person', + ])->add('createPeriod', SubmitType::class, [ + 'label' => 'Add the person and create an accompanying period', + ]); $form->handleRequest($request); diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 882be10ed..220a8a307 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -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") */