diff --git a/src/Dto/Matchfunding/MatchCallSubmissionCreationDto.php b/src/Dto/Matchfunding/MatchCallSubmissionCreationDto.php index 9299538..b07c337 100644 --- a/src/Dto/Matchfunding/MatchCallSubmissionCreationDto.php +++ b/src/Dto/Matchfunding/MatchCallSubmissionCreationDto.php @@ -14,6 +14,10 @@ class MatchCallSubmissionCreationDto * The MatchCall to which this MatchCallSubmission belongs to. */ #[Assert\NotBlank()] + #[Assert\Expression( + expression: 'value.status === enum("App\\\Entity\\\Matchfunding\\\MatchCallStatus::InCalling")', + message: 'MatchCallSubmissions can only relate to a MatchCall with `in_calling` status.' + )] public MatchCallApiResource $call; /**