fix some person issues

This commit is contained in:
juminet
2021-12-12 14:39:59 +00:00
committed by Julien Fastré
parent 133ac67794
commit 7e045e964a
11 changed files with 52 additions and 13 deletions

View File

@@ -244,6 +244,8 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* @Assert\Date(
* groups={"general", "creation"}
* )
* @Assert\GreaterThan(propertyPath="birthDate")
* @Assert\LessThanOrEqual("today")
*/
private ?DateTimeImmutable $deathdate = null;
@@ -1774,7 +1776,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this;
}
public function setNumberOfChildren(int $numberOfChildren): self
public function setNumberOfChildren(?int $numberOfChildren): self
{
$this->numberOfChildren = $numberOfChildren;