Bean Validation 2.0 is among all the new Java EE 8 good new features: In this post I will share a sample application I used to see in action the following Bean Validation 2.0 features: List items validation Temporal validation using Java 8 Project setup Hibernate Validator is the RI for Bean Validation 2.0 and the project, being a maven or gradle project, must use the following dependencies (or later versions): org.hibernate:hibernate-validator:6.0.2.Final and you should also add org.glassfish:javax.el:3.0.1-X as a hibernate validator dependency, where X is the build, check the maven repository for more. This is what my pom.xml looks like: Using bean validation annotations in a bean fields To test the new annotations I used the following bean: Notice the new annotations in subscribers and in manufactureDate and expirationDate fields: subscribers : I am validating users emails, all the Strings added to this list should b...
Blog about programming, client applications and intelligent use of AI. Talking about Machine Learning and AI before it was cool! We like to use JavaFX, Processing, Local execution of ML and LLM models and everything that is fun!