If you are using Apache Maven, add the following dependency to your pom.xml to give it a test ride:
<dependency> <groupId>org.hibernate.validator</groupId> <artifactId>hibernate-validator</artifactId> <version>6.0.0.Alpha1</version> </dependency>
The 6.0.0.Alpha1 release provides all the functionality of the Early Draft 1. In addition there is support for
nested type argument constraints, e.g.
Map<String, Size(min=1) List<@NotNull Item>> itemsByCategory; this addresses open question #1 from the proposal for the validation of container elements
definition of constraints using Lambda expressions and method references
java.time.Durationvia two new constraints,
If you think those things should be added to the spec, please let us know. Your feedback on these features as well as all the other Early Draft 1 additions will be much appreciated!
Check out the original Hibernate Validator release announcement for all the details.