[Validator] Code property can't be populated to ConstraintViolation

 Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7273, #9691
| License       | MIT
| Doc PR        |  symfony/symfony-docs#2302