diff --git a/src/Form/Model/ParticipantData.php b/src/Form/Model/ParticipantData.php index 80c4084..395ae86 100644 --- a/src/Form/Model/ParticipantData.php +++ b/src/Form/Model/ParticipantData.php @@ -81,7 +81,13 @@ class ParticipantData #[Assert\Callback] public function assertPickupSelected(ExecutionContextInterface $context): void { - if (null !== $this->transportationServiceTo && null === $this->pickup) { + $transportationServiceTo = $this->transportationServiceTo; + + if ( + null !== $transportationServiceTo + && 'BUS' === $transportationServiceTo->subType + && null === $this->pickup + ) { $context->buildViolation('Bitte auswählen') ->atPath('pickup') ->addViolation()