mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix person validation
This commit is contained in:
@@ -62,9 +62,7 @@ use function in_array;
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "person": Person::class
|
||||
* })
|
||||
* @PersonHasCenter(
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
* @PersonHasCenter
|
||||
* @HouseholdMembershipSequential(
|
||||
* groups={"household_memberships"}
|
||||
* )
|
||||
@@ -250,8 +248,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
* @Assert\Email(
|
||||
* checkMX=true,
|
||||
* groups={"general", "creation"}
|
||||
* checkMX=true
|
||||
* )
|
||||
*/
|
||||
private $email = '';
|
||||
@@ -262,12 +259,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @Assert\NotBlank(
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
* @Assert\NotBlank
|
||||
* @Assert\Length(
|
||||
* max=255,
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
*/
|
||||
private $firstName;
|
||||
@@ -288,9 +282,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=9, nullable=true)
|
||||
* @Assert\NotNull(
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
* @Assert\NotNull
|
||||
*/
|
||||
private $gender;
|
||||
|
||||
@@ -334,12 +326,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @Assert\NotBlank(
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
* @Assert\NotBlank
|
||||
* @Assert\Length(
|
||||
* max=255,
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
*/
|
||||
private $lastName;
|
||||
@@ -367,9 +356,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* @var DateTime
|
||||
*
|
||||
* @ORM\Column(type="date", nullable=true)
|
||||
* @Assert\Date(
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
* @Assert\Date
|
||||
*/
|
||||
private ?DateTime $maritalStatusDate = null;
|
||||
|
||||
@@ -388,11 +375,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* @ORM\Column(type="text")
|
||||
* @Assert\Regex(
|
||||
* pattern="/^([\+{1}])([0-9\s*]{4,20})$/",
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
* @PhonenumberConstraint(
|
||||
* type="mobile",
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
*/
|
||||
private string $mobilenumber = '';
|
||||
@@ -430,7 +415,6 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* )
|
||||
* @Assert\Valid(
|
||||
* traverse=true,
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
*/
|
||||
private $otherPhoneNumbers;
|
||||
@@ -449,11 +433,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* @ORM\Column(type="text")
|
||||
* @Assert\Regex(
|
||||
* pattern="/^([\+{1}])([0-9\s*]{4,20})$/",
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
* @PhonenumberConstraint(
|
||||
* type="landline",
|
||||
* groups={"general", "creation"}
|
||||
* )
|
||||
*/
|
||||
private string $phonenumber = '';
|
||||
|
Reference in New Issue
Block a user