From JSR-339:
For ease of implementation, JAX-RS MUST support processing groups other than Default.
This greatly limits the usefulness of validation in JAX-RS, because, for example, you usually use the same model object to create and update, but to create an identifier, objects should not be provided and an identifier should be specified for updating, which can be easily verified using validation groups. In general, all model objects that are used in more than one thread cannot be verified.
I don’t understand the argument of simplicity because Bean Validation already supports groups, so the JAX-RS implementation just needs to pass the group to the Bean a validation implementation such as the Hibernate Validator.
So, are there any plans to add validation groups to JAX-RS?
source
share