entity person: create a validator to check a person entity is linked

with a center

This validator take a parameter in configuration
This commit is contained in:
2021-09-01 14:04:40 +02:00
parent 03e8624528
commit eec798cfd3
5 changed files with 127 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
<?php
namespace Chill\PersonBundle\Validator\Constraints\Person;
class PersonHasCenter extends \Symfony\Component\Validator\Constraint
{
public string $message = "A center is required";
public function getTargets()
{
return [
self::CLASS_CONSTRAINT
];
}
}