Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Hibernate Validator - Bean Validation 1.1 (JSR 349) Reference Implementation

Octocat-spinner-32 annotation-processor [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 cdi [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 distribution [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 documentation [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 engine HV-871 Making TypeHelperTest compilable with Java 7 and 8 March 05, 2014
Octocat-spinner-32 integration [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 performance [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 src HV-837 Always registering HV beans under @HibernateValidator qualifie… February 04, 2014
Octocat-spinner-32 tck-runner [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 .gitattributes HV-760 Adding .gitattributes to ensure consistent line ending style May 02, 2013
Octocat-spinner-32 .gitignore HV-683 Configuring git to ignore output folders anywhere in the hiera… February 11, 2013
Octocat-spinner-32 CONTRIBUTING.md HV-643 Fixing link typo December 08, 2012
Octocat-spinner-32 README.md Preparation for Hibernate Validator 5.1.0.Final release March 02, 2014
Octocat-spinner-32 changelog.txt Preparation for Hibernate Validator 5.1.0.Final release March 02, 2014
Octocat-spinner-32 copyright.txt HV-838 Adding Brent to copyright.txt December 06, 2013
Octocat-spinner-32 license.txt BVAL-31 refactored some code, imported AnnotationFactory from annotat… January 07, 2009
Octocat-spinner-32 pom.xml [maven-release-plugin] prepare for next development iteration March 02, 2014
Octocat-spinner-32 settings-example.xml HV-540 removing the repository settings from the pom. adding a sample… December 12, 2011
README.md

Hibernate Validator

Version: 5.1.0.Final, 02.03.2014

What is it?

This is the reference implementation of JSR-349 - Bean Validation 1.1. Bean Validation defines a metadata model and API for JavaBean as well as method validation. The default metadata source are annotations, with the ability to override and extend the meta-data through the use of XML validation descriptors.

Documentation

The documentation for this release is included in the docs directory of the distribution package or can be accessed online.

Release Notes

The full list of changes for this release can be found in changelog.txt.

System Requirements

JDK 1.6 or above.

Using Hibernate Validator

  • In case you use the distribution archive from the download site, copy dist/hibernate-validator-<version>.jar together with all jar files from dist/lib/required into the classpath of your application. For the purposes of logging, Hibernate Validator uses the JBoss Logging API, an abstraction layer which supports several logging solutions such (e.g. log4j or the logging framework provided by the JDK) as implementation. Just add a supported logging library to the classpath (e.g. log4j-<version>.jar) and JBoss Logging will delegate any log requests to that provider.

  • Add the following to your Maven or Ivy dependency list (Hibernate Validator can be found in the JBoss Maven repository):

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>5.1.0.Final</version>
    </dependency>
    

    You also need an API and implementation of the Unified Expression Language. These dependencies must be explicitly added in an SE environment. In an EE environment they are often already provided.

    <dependency>
       <groupId>javax.el</groupId>
       <artifactId>javax.el-api</artifactId>
       <version>2.2.4</version>
    </dependency>
    <dependency>
       <groupId>org.glassfish.web</groupId>
       <artifactId>javax.el</artifactId>
       <version>2.2.4</version>
    </dependency>
    
  • Bean Validation defines integration points with CDI. If your application runs in an environment which does not provide this integration out of the box, you may use the Hibernate Validator CDI portable extension by adding the following dependency:

    <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-validator-cdi</artifactId>
       <version>5.1.0.Final</version>
    </dependency>
    
  • hibernate-validator-annotation-processor-<version>.jar is an optional jar which can be integrated with your build environment respectively IDE to verify that constraint annotations are correctly used. Refer to the online documentation for more information.

Licensing

Hibernate Validator itself as well as the Bean Validation API and TCK are all provided and distributed under the Apache Software License 2.0. Refer to license.txt for more information.

Build from Source

You can build Hibernate Validator from source by cloning the git repository git://github.com/hibernate/hibernate-validator.git. You will also need a JDK 7 and Maven 3 (>= 3.0.3). With these prerequisites in place you can compile the source via

mvn clean install -s settings-example.xml

The documentation module requires an additional tool called po2xml. If you don't have po2xml installed you can skip the building of the documentation via:

mvn clean install -DdisableDocumentationBuild=true -s settings-example.xml

There are more build options available as well. For more information refer to Contributing to Hibernate Validator.

Hibernate Validator URLs

Something went wrong with that request. Please try again.