Validate against new submissions for calls not in_calling status

This commit is contained in:
2025-05-29 14:51:23 +02:00
parent 6d6096b865
commit 93ab86ec31
@@ -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;
/**