Red Hat

Hibernate Validator

Express validation rules in a standardized way using annotation-based constraints and benefit from transparent integration with a wide variety of frameworks.

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 {

   private String manufacturer;

   @Size(min = 2, max = 14)
   private String licensePlate;

   private int seatCount;

   // ...


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 5.x is the reference implementation Bean Validation 1.1!

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

Other news
back to top