项目作者: hibernate

项目描述 :
Hibernate Validator - Jakarta Bean Validation Reference Implementation
高级语言: Java
项目地址: git://github.com/hibernate/hibernate-validator.git
创建时间: 2010-10-08T13:25:07Z
项目社区:https://github.com/hibernate/hibernate-validator

开源协议:Other

下载


Hibernate Validator

Version: 9.0.0.Final - 2025-05-20

Maven Central
Build Status
Sonar Coverage
Quality gate
Develocity
Reproducible Builds

What is it?

This is the reference implementation of Jakarta Validation 3.1.
Jakarta 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 metadata 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 17 or above.

Using Hibernate Validator

  • In case you use the distribution archive from the download site, copy dist/hibernate-validator-.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-.jar) and JBoss
    Logging will delegate any log requests to that provider.

  • Add the following artifact to your Maven/Ivy/Gradle dependency list:

    1. <dependency>
    2. <groupId>org.hibernate.validator</groupId>
    3. <artifactId>hibernate-validator</artifactId>
    4. <version>9.0.0.Final</version>
    5. </dependency>

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

    1. <dependency>
    2. <groupId>org.glassfish.expressly</groupId>
    3. <artifactId>expressly</artifactId>
    4. <version>6.0.0</version>
    5. </dependency>
  • Jakarta 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:

    1. <dependency>
    2. <groupId>org.hibernate.validator</groupId>
    3. <artifactId>hibernate-validator-cdi</artifactId>
    4. <version>9.0.0.Final</version>
    5. </dependency>
  • hibernate-validator-annotation-processor-.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 Jakarta 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. Refer to the Contributing to Hibernate Validator guide for more information.

Continuous Integration

The official Continuous Integration service for the project is hosted on ci.hibernate.org.

We also include a GitHub action build file that can be used by those interested in
running builds on their own forks.
This build runs on Linux and Windows and executes the TCK both in standalone and in container modes.

Hibernate Validator URLs