This commit is contained in:
2026-06-10 18:22:27 +02:00
parent 7f31b63aaa
commit 83b475987c
50 changed files with 2550 additions and 11 deletions
@@ -0,0 +1,11 @@
---
globs: "**/UI/**/*.php, **/Logic/**/DTO/*.php"
description: Defines the standard for input validation in Symfony 7 projects.
Logic layer DTOs hold the validation rules via attributes. The UI layer is
responsible for executing the validation using the injected validator service,
ensuring clean separation of concerns and preventing invalid data from
entering the business logic.
alwaysApply: false
---
All input validation must be performed on DTOs located in /src/Logic/[FeatureName]/DTO using PHP 8 #[Assert\...] attributes. Controllers in the UI layer (/src/UI/...) must inject Symfony\Component\Validator\Validator\ValidatorInterface, validate the DTO before passing it to UseCases, and handle validation errors immediately.