You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
… (webmozart)
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Validator] Added ConstraintViolation::getConstraint()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5050
| License | MIT
| Doc PR | -
This PR adds a `getConstraint()` method to the `ConstraintViolation` in order to access the constraint causing the violation.
Related to #7276, #7273 and #9691.
Commits
-------
ce1d209 [Validator] Added ConstraintViolation::getConstraint()
I'm missing a getAssertType() function in the ConstraintViolation class which would indicate which constraint triggered the violation.
This is useful when you make your own error response format, as currently it's impossible to tell which of the constraints on a member was triggered.
The text was updated successfully, but these errors were encountered: