initial
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user