[Validator] Added ConstraintViolation::getConstraint()
feature #11657 [Validator] Added ConstraintViolation::getConstraint() (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()