diff --git a/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php b/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php index 7a70e7ca6..c9bc4dd82 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php @@ -55,7 +55,6 @@ class DateIntervalType extends AbstractType { $builder ->add('n', IntegerType::class, [ - 'scale' => 0, 'constraints' => [ new GreaterThan([ 'value' => 0, diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php index a37f1dff7..a03da4beb 100644 --- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php @@ -29,7 +29,6 @@ use Symfony\Component\Validator\Constraints as Assert; #[ORM\Index(name: 'by_end_date', columns: ['end_date'])] class SingleTask extends AbstractTask { - #[Assert\Date] #[Serializer\Groups(['read'])] #[ORM\Column(name: 'end_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)] private ?\DateTime $endDate = null; @@ -44,7 +43,6 @@ class SingleTask extends AbstractTask private ?RecurringTask $recurringTask = null; #[Serializer\Groups(['read'])] - #[Assert\Date] #[Assert\Expression('value === null or this.getEndDate() === null or value < this.getEndDate()', message: 'The start date must be before the end date')] #[Assert\Expression('value === null or this.getWarningDate() === null or this.getWarningDate() > this.getStartDate()', message: 'The start date must be before warning date')] #[ORM\Column(name: 'start_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]