Application layer agnostic validation
Hibernate Validator allows to express and validate application constraints. The default metadata source are annotations, with the ability to override and extend through the use of XML. It is not tied to a specific application tier or programming model and is available for both server and client application programming. But a simple example says more than 1000 words:
public class Car {
@NotNull
private String manufacturer;
@NotNull
@Size(min = 2, max = 14)
private String licensePlate;
@Min(2)
private int seatCount;
// ...
}
Extendable
Hibernate Validator offers a configurable bootstrap API as well as a range of built-in constraints. The latter can easily be extended by creating custom constraints.
Rich metadata API
Hibernate Validator gives access to constraint configuration via a metadata API facilitating, for example, tooling integration.
Reference implementation
Hibernate Validator 6.x is the reference implementation Bean Validation 2.0.
Added value
Hibernate Validator offers additional value on top of the features required by Bean Validation. For example, a programmatic constraint configuration API as well as an annotation processor which plugs into the build process and raises compilation errors whenever constraint annotations are incorrectly used.
Latest news
Hibernate Validator 6.2.0.Final and 7.0.0.Final released
2021-01-06As of now, you are probably aware of the Jakarta EE 9 effort that aims to provide new foundations for EE innovation. Jakarta EE 9 is...
Hibernate Validator 6.1.7.Final and 6.0.22.Final released
2020-12-16We just released Hibernate Validator 6.1.7.Final which contains some minor fixes. This is a recommended upgrade for everyone using Hibernate Validator and it is a drop-in...
Hibernate Validator 6.2.0.CR1 and 7.0.0.CR1 released
2020-12-08As of now, you are probably aware of the Jakarta EE 9 effort that aims to provide new foundations for EE innovation. Jakarta EE 9 is...
Hibernate Validator 6.1.6.Final and 6.0.21.Final released
2020-09-30We just released Hibernate Validator 6.1.6.Final which contains a few fixes and the new @Normalized constraint. This is a recommended upgrade for everyone using Hibernate Validator...
Hibernate Validator 6.1.5.Final and 6.0.20.Final released
2020-05-07We just released Hibernate Validator 6.1.5.Final which contains a fix for CVE-2020-10693 and a few other minor fixes. This is a recommended upgrade for everyone using...
Hibernate Validator 6.1.3.Final and 6.0.19.Final released
2020-04-10We just released Hibernate Validator 6.1.3.Final which contains some fixes for our translations and a performance improvement for validation of executables (i.e. methods and constructors). This...