Files
mautic-marketing-program-bu…/Validator/Constraints/EndDateAfterStartDate.php
T
2026-11-07 19:31:49 +01:00

22 lines
487 B
PHP

<?php
declare(strict_types=1);
namespace MauticPlugin\PlanBundle\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* Class constraint for any DateRangeInterface (Plan, Task): when both dates are set, endDate must be
* on or after startDate.
*/
class EndDateAfterStartDate extends Constraint
{
public string $message = 'mautic.plan.end_date.before_start_date';
public function getTargets(): string
{
return self::CLASS_CONSTRAINT;
}
}