New validation API usage in Class Constraint Validator

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.5
| Fixed tickets |

The code in the documentation about Class Constraint Validator was still using the deprecated validation API
you are missing `->atPath('foo')`