-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
It seems all (or at least most) of the base validation constraints (Symfony\Component\Validator\Constraints) set an error code when they are building the ConstraintViolation.
But: The UniqueEntity constraint (\Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity) does not.
I currently create an API where I want to provide the users error codes with every constraint violation.
How am I supposed to do that with the UniqueEntity constraint (or more general with Constraints which do not set an error code)?
Wouldn't it be good to make the error code required for ConstraintViolations?