From 50db96ffbc3e5f8d3be3fc63cdd473b470823859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 7 Nov 2022 18:20:34 +0100 Subject: [PATCH] Fix validation of fixed date --- .../ChillMainBundle/Form/Type/PickRollingDateType.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php b/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php index a3013f792..2c90379f2 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php @@ -48,8 +48,8 @@ class PickRollingDateType extends AbstractType 'class' => RollingDate::class, 'empty_data' => new RollingDate(RollingDate::T_TODAY), 'constraints' => [ - new Callback([$this, 'validate']) - ] + new Callback([$this, 'validate']), + ], ]); } @@ -60,8 +60,7 @@ class PickRollingDateType extends AbstractType $context ->buildViolation('rolling_date.When fixed date is selected, you must provide a date') ->atPath('roll') - ->addViolation() - ; + ->addViolation(); } } }