Giter Club home page Giter Club logo

validator-lite's Introduction

Validator-lite

validator-lite maven central size license

项目简介

通用参数校验插件 精简版,虽说是精简版,但麻雀虽小五脏俱全,此项目不仅支持Java注解标注,而且支持各种规则表达式验证,并提供了国际化语言配置,支持扩展自定义规则验证。

此项目并没有实现 JSR-303 Javabean关于Bean的验证规范,如果需要规范验证的话还是请使用目前较为流行的 hibernate-validator 实现,虽说规范这东西吧它很重要,但有时候我们并不是会用到这些规范的所有实现,但实际情况往往是我们并不需要使用太多规范性的东西,而只需要其中的某一个核心模块,此时规范将会变得相对臃肿,约束太多会造成使用上的不便,此项目的出现正是为了解决这一问题,本项目的重心在于处理各种参数的验证问题。

特点是:使用简单、扩展简单、轻量化、支持国际化语言等。基本可以这样说,hibernate-validator拥有的验证,本项目基本都能实现,只是把核心重点放在了数据验证上。

注意:此项目是一款完全开源的项目,您可以在任何适用的场景使用它,商用或者学习都可以,如果您有任何项目上的疑问,可以在issue上提出您问题,我会在第一时间回复您,如果您觉得它对您有些许帮助,希望能留下一个您的星星(★),谢谢。


此项目遵照 Apache 2.0 License 开源许可。

核心亮点

  • 支持注解验证,扩展也很简单;
  • 支持表达式验证,在验证规则过多的情况下可以表达式验证;
  • 支持国际化语言,更可以覆盖默认译本;
  • 支持条件性验证,指定规则验证生效的时机,而不是所有都验证;
  • 不局限于Bean的验证,普通参数也支持;
  • 支持参数分组验证
  • 验证效率高,程序启动会默认对所有验证规则进行预编译,极大的提升了验证效率;
  • 支持预编译,在某些复杂验证规则场景下,预编译会极大的减少性能损耗;
  • 支持多线程并发
  • 支持自定义扩展

关联文档

关于整合spring,请移步到:https://github.com/tangxbai/validator-lite-spring

关于整合springboot,请移步到:https://github.com/tangxbai/validator-lite-spring-boot

快速开始

Maven方式(推荐

<dependency>
	<groupId>com.viiyue.plugins</groupId>
	<artifactId>validator-lite</artifactId>
	<version>[VERSION]</version>
</dependency>

如果你没有使用Maven构建工具,那么可以通过以下途径下载相关jar包,并导入到你的编辑器。

点击跳转下载页面

如何下载

如何获取最新版本?点击这里获取最新版本

关于作者

validator-lite's People

Contributors

tangxbai avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.