fix: don't check pickup unless transportation by bus is selected
This commit is contained in:
@@ -81,7 +81,13 @@ class ParticipantData
|
|||||||
#[Assert\Callback]
|
#[Assert\Callback]
|
||||||
public function assertPickupSelected(ExecutionContextInterface $context): void
|
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')
|
$context->buildViolation('Bitte auswählen')
|
||||||
->atPath('pickup')
|
->atPath('pickup')
|
||||||
->addViolation()
|
->addViolation()
|
||||||
|
|||||||
Reference in New Issue
Block a user