feat: add validation for charges targetting projects not in campaign

This commit is contained in:
2026-08-26 11:52:03 +02:00
parent 4d4de0fc7b
commit 40ff4b5ca4
4 changed files with 61 additions and 0 deletions
@@ -0,0 +1,11 @@
<?php
namespace App\Validator;
use Symfony\Component\Validator\Constraint;
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
final class ChargeToProjectInCampaign extends Constraint
{
public string $message = 'The targeted Project {{ project }} behind Accounting {{ target }} is not in a status where it can receive Charges.';
}