mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-13 01:17:45 +00:00
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:
@@ -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
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user