序言

验证数据是贯穿所有应用程序层(从表示层到持久层)的常见任务。通常在每个层中实现相同的验证逻辑,这既耗时又容易出错。为了避免这些验证的重复,开发人员经常将验证逻辑直接捆绑到域模型中,使域类与验证代码混乱在一起,验证代码实际上是关于类本身的元数据。(layers, from the presentation to the persistence layer. Often the same validation logic is implemented in each layer which is time consuming and error-prone. To avoid duplication of these validations, developers often bundle validation logic directly into the domain model, cluttering domain classes with validation code which is really metadata about the class itself.)

Hibernate Validator 6.0.13 序言_xml

JSR 380 - Bean Validation 2.0 定义实体模型和方法验证的元数据模型和API。默认的元数据源是注释,具有通过使用XML覆盖和扩展元数据的能力。API不绑定到特定的应用层或编程模型。它特别不与Web或持久层绑定,并且既可用于服务器端应用程序编程,也可用于富客户端Swing应用程序开发人员。(defines a metadata model and API for entity and method validation. The default metadata source are annotations, with the ability to override and extend the meta-data through the use of XML. The API is not tied to a specific application tier nor programming model. It is specifically not tied to either web or persistence tier, and is available for both server-side application programming, as well as rich client Swing application developers.)

Hibernate Validator 6.0.13 序言_ide_02

Hibernate验证器是JSR 380的参考实现。实现本身以及bean验证API和TCK都是在Apache软件许可证2.0下提供和分发的。(Hibernate Validator is the reference implementation of this JSR 380. The implementation itself as well as the Bean Validation API and TCK are all provided and distributed under the Apache Software License 2.0.)
Hibernate Validator 6 and Bean Validation 2.0 require Java 8 or later.

1、解读Hibernate-Validator官方文档入门篇-播放地址