23 lines
515 B
PHP
23 lines
515 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Validator\Constraints;
|
|
|
|
use Symfony\Component\Validator\Constraint;
|
|
|
|
/**
|
|
* Validates participant data for cross-field consistency.
|
|
*
|
|
* Applied as a class-level constraint on ParticipantDto to enforce business rules
|
|
* that depend on multiple fields (e.g., requiring pickup when bus transport is selected).
|
|
*/
|
|
#[\Attribute]
|
|
class Participant extends Constraint
|
|
{
|
|
public function getTargets(): array|string
|
|
{
|
|
return static::CLASS_CONSTRAINT;
|
|
}
|
|
}
|