Files
myep/src/Validator/Constraints/MandatoryAdditionalServicesSelected.php
T

26 lines
604 B
PHP

<?php
declare(strict_types=1);
namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* Validates that all mandatory additional services are selected.
*
* Applied on ParticipantEditDto to enforce mandatory additional services based
* on participant age and booking eligibility in both create and edit flows.
*/
#[\Attribute]
class MandatoryAdditionalServicesSelected extends Constraint
{
public string $message = 'Bitte wähle alle Pflichtleistungen aus.';
public function getTargets(): array|string
{
return static::CLASS_CONSTRAINT;
}
}