The JSR 380 specification takes care of bean validation, and offers an API for this:
<dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>2.0.0.Final</version> </dependency>
Bean Validation Page
Using Bean Validation
Last updated 4 years ago