The JAX-RS team (esp Santiago) feels that it's a good idea to be able to disable validation for a given field/method, for a whole class or even globally.
The use case is that for debugging purposes or for last minute changes, code is sometimes removed / disabled. It is useful to be able to do that with as few change as possible.
I (Emmanuel) am not really convinced of the usefulness of this. One obvious workaround is to comment the constraint(s). Another is to activate a different group.
Note that if no constraint is present on a method or bean, Bean Validation implementations do short circuit as much as possible.
|