Add more examples on how to use methods for validating method and constructor constraints

Description

In examples 5.1.2.1. of the spec (§5.1.2. Methods for validating method and constructor constraints) it says "Do we need more examples?". The answer is yes ;o)

Method validation is new so it would make things clearer to have more examples. I've been playing with this new feature [1] and I have some doubts on the way I am using validateReturnValue (check [2]).

So I think a more concrete and complete example in the spec would help. You can have a look at my GitHub [1] and the experiments I've been playing with.

[1] https://github.com/agoncal/agoncal-sample-bean-validation
[2] https://github.com/agoncal/agoncal-sample-bean-validation/blob/master/01-Method/src/test/java/org/agoncal/sample/beanvalidation/method/CardValidatorTest.java

Environment

None

Assignee

Emmanuel Bernard

Reporter

Antonio Goncalves

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Minor
Configure