Bean Validation 2.0 - you’ve put your annotations everywhere!
summary
Bean Validation 2.0 makes Java 8 a hard requirement and adds concrete features: @Repeatable constraints for multiple validation groups, container element validation (type-use annotations) to validate list elements, map keys and values and cascade into nested collections, and Optional support plus full Java Time API constraints including new futureOrPresent/pastOrPresent rules. It defines new constraints (NotEmpty/NotBlank/Positive/etc.), a value extractor SPI for Guava or other collections, ships a faster Hibernate Validator reference implementation, and is available for WildFly (patch) and Spring 5.
AI-written summary · about
chapters (10)
- 0:00Intro
- 1:03Bean Validation 2.0 - JSR 380
- 1:38Use Case: Different Passwords for Different Roles
- 2:42Use Case: Ensure Non-Empty Collection Elements
- 4:01Cascaded Validation
- 7:11Custom Containers
- 9:07Use Case: Delivery Date in the Future
- 10:12New Constraints
- 11:40Trying It Out Yourself
- 13:25Resources
related talks
45mBean Validation 2 0
43mWhat's New in Bean Validation 2.0 - Java 8 Support and More
37mStop Writing Assertions, Start Validating!
55mOn Annotations — Time to Stop the Demons
51mSpring Puzzlers - second season
46mJava EE 8: What’s New in the Java EE 8 Release
59mModern Java Component Design with Spring 4 3
43mJava EE 8
