Search
Hibernate Validator

Hibernate Validator

Relational Persistence for Java and .NET

Hibernate Validator

Hibernate Validator 4.x is the reference implementation for JSR 303 - Bean Validation of which Red Hat is the specification lead.

JSR 303 - Bean Validation defines a metadata model and API for JavaBean validation. The default metadata source is annotations, with the ability to override and extend the meta-data through the use of XML validation descriptors. The API is not tied to a specific application tier or programming model. It is specifically not tied to either the web tier or the persistence tier, and is available for both server-side application programming, as well as rich client Swing application developer.

Together with the reference implementation of JSR 303 - Bean Validation, Hibernate provides also the Bean Validation TCK. You can find more information about the TCK on the Hibernate wiki.

Hibernate Validator 4, together with the Bean Validation API and TCK are all provided and distributed by JBoss (Red Hat) under the Apache Software License 2.0.

Hibernate Validator Annotation Processor

Have you ever unintentionally done one of the following:

  • Annotated a bean property with a constraint which does not have a constraint validator for this type  (e.g. by annotated a String with @Past)
  • Annotated the setter of a JavaBean property instead of the getter
  • Annotated static fields or methods with constraint annotations

Then the Hibernate Validator Annotation Processor is the right thing for you. It is a annotation processor based on JSR-269 which plugs into the build process and raises compilation errors whenever constraint annotations are incorrectly used. Read more about this processor here. It is available in the JBoss Maven Repository.

Hibernate Validator News

Hibernate Validator 4.3.0.Final seen in the wild
May 9, 2012 10:31 AM by Hardy Ferentschik
Without further ado, Hibernate Validator 4.3.0.Final is available for download in the JBoss Maven Repository under the GAV org.hibernate:hibernate-validator:4.3.0.Final or via SourceForge. The changelog for this version does not contain much, so let me summarize the most important changes of Hib…
View more hibernate validator news