apply maxHolder constraint on houehold

This commit is contained in:
Julien Fastré 2021-06-11 17:08:35 +02:00
parent ecc8b929ca
commit 45dc8ed661
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ use Doctrine\Common\Collections\Criteria;
use Symfony\Component\Serializer\Annotation as Serializer;
use Chill\MainBundle\Entity\Address;
use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Validator\Constraints\Household\MaxHolder;
/**
* @ORM\Entity
@ -18,6 +19,7 @@ use Chill\PersonBundle\Entity\Household\HouseholdMember;
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
* "household"=Household::class
* })
* @MasHolder()
*/
class Household
{

View File

@ -4,7 +4,9 @@ namespace Chill\PersonBundle\Validator\Constraints\Household;
use Symfony\Component\Validator\Constraint;
/**
* @Annotation
*/
class MaxHolder extends Constraint
{
public $message = 'household.max_holder_overflowed';