move validation on person into annotations

This commit is contained in:
2021-09-01 16:06:20 +02:00
parent 7faddbe3fe
commit 41d76542b4
9 changed files with 165 additions and 97 deletions

View File

@@ -29,9 +29,11 @@ use Symfony\Component\Validator\Constraint;
* (this interval_spec itself is based on ISO8601 :
* https://en.wikipedia.org/wiki/ISO_8601#Durations)
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* @Annotation
*/
class Birthdate extends Constraint
{
public const BIRTHDATE_INVALID_CODE = '3f42fd96-0b2d-11ec-8cf3-0f3b1b1ca1c4';
public $message = "The birthdate must be before %date%";
}