Bean Validator-hibernate Validator

Source: Internet
Author: User

In the background development process, the validation of parameters becomes an indispensable part of the development environment. For example, the parameter can not be null,email so must conform to the format of email, if manually make if judgment or write regular expression to judge the unintended development efficiency is too slow, in time, cost, quality of the game will inevitably lag behind. So the verification layer is the inevitable result of abstraction, the following is a few solutions.

The validation bean is developed based on the JSR-303 standard, is implemented using annotations, and is convenient, but this is only an interface, no specific implementation. Hibernate Validator is a hibernate standalone package that can be directly referenced, he implements the validation bean at the same time has done the expansion, relatively powerful. ( for annotations, see how the Annotation interpreter works ).

Refer to https://www.cnblogs.com/xiaogangfan/p/5987659.html, you can define your own annotations.

Bean Validator-hibernate Validator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.