From 048941625b26429ab82d814a227cef418c81f3c5 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sun, 19 Feb 2023 15:18:03 +0100 Subject: [PATCH] Add attribute to validators --- src/Validator/Constraints/MoneyGreaterThan.php | 1 + src/Validator/Constraints/MoneyGreaterThanOrEqual.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Validator/Constraints/MoneyGreaterThan.php b/src/Validator/Constraints/MoneyGreaterThan.php index 018bfbf..9218f93 100644 --- a/src/Validator/Constraints/MoneyGreaterThan.php +++ b/src/Validator/Constraints/MoneyGreaterThan.php @@ -15,6 +15,7 @@ /** * @Annotation */ +#[\Attribute] class MoneyGreaterThan extends Constraint { public string $message = 'This value must be greater than {{ compareWith }}!'; diff --git a/src/Validator/Constraints/MoneyGreaterThanOrEqual.php b/src/Validator/Constraints/MoneyGreaterThanOrEqual.php index 7ab207f..704c066 100644 --- a/src/Validator/Constraints/MoneyGreaterThanOrEqual.php +++ b/src/Validator/Constraints/MoneyGreaterThanOrEqual.php @@ -15,6 +15,7 @@ /** * @Annotation */ +#[\Attribute] class MoneyGreaterThanOrEqual extends Constraint { public string $message = 'This value must be greater than or equal to {{ compareWith }}!';