From b1a4af73ae492ac4b129666fc382dc35bdc42689 Mon Sep 17 00:00:00 2001 From: Ion Bazan Date: Thu, 14 Oct 2021 13:36:48 +0800 Subject: [PATCH] support Unique constraint as attribute --- Validator/Constraints/Unique.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Validator/Constraints/Unique.php b/Validator/Constraints/Unique.php index d8ec7256..ec993a07 100644 --- a/Validator/Constraints/Unique.php +++ b/Validator/Constraints/Unique.php @@ -10,7 +10,9 @@ * Constraint for the unique document validator * * @Annotation + * @Target({"CLASS", "ANNOTATION"}) */ +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] class Unique extends UniqueEntity { /** @var string */