Fix validation of fixed date

This commit is contained in:
Julien Fastré 2022-11-07 18:20:34 +01:00
parent 86be95ac43
commit 50db96ffbc

View File

@ -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();
}
}
}