The reference implementation is provided by Hibernate and is called Hibernate Validator. Hibernate Bean Validation provides the same constraints as the built in constraints and extends them with a range of very useful custom constraints. Among these are constraints for validation of an email, credit card numbers, social security, and much more.
- [Narrator] Besides the Java EE-provided implementation…of the Bean Validation specification,…there is another implementation.…It is provided by Hibernate,…and is called Hibernate Validator,…and is one of the many great projects…under the Hibernate organization.…Hibernate Validator is referred to…as a reference implementation,…or the Bean Validation API JSR 380,…because it implements all of the features…specified in the JSR specification,…and can be used as a substitute…for the implementation provided by Java EE.…
In fact, you'll find that most developers…prefer the Hibernate Validator implementation…for many reasons, not just because it integrates…well with other Hibernate projects,…such as Hibernate ORM,…that's Hibernate's JPA implementation,…but because it comes with so many more built-in constraints.…Hibernate Validator provides the same set of constraints…as the built-in constraints, but also, extends them…with a range of very useful custom constraints.…Among these are constraints for validating credit cards,…
In this course, you can journey through the many constraints that are built into the 2.0 version of the Bean Validation API, as well as the additional constraints provided by the Hibernate Validator 6.0. Learn Bean Validation in a practical way while you build a functioning web application. Instructor Alex Theedom shows how to extend the API with custom constraints and how to internationalize validation failure messages. Plus, learn advanced techniques such as cross-field and cross-parameter validation, and how Bean Validation integrates with other Java EE technologies such as JAX-RS, Java Persistence API (JPA), and JavaServer Faces (JSF). By the end of this course, you will have gained practical experience of using Bean Validation in a real web application and be able to implement what you have learned in your own Java applications.
- What is Bean Validation?
- Applying the built-in constraints
- Applying Hibernate constraints
- Designing custom constraint validators
- Managing and configuring validation failure messages
- Creating custom composite constraints
- Creating custom validation constraints
- Cross-field and cross-parameter validation
- Integration with RESTful web services (JAX-RS)