What is a JSR 303-bean Validation?

Source: Internet
Author: User

 

About Bean Validation

  The JSR 303-bean Validation is a sub-specification in Jree6, and theJSR 303-bean Validation focuses on the following practical issues:

  At any time, when you are dealing with the business logic of an application, data validation is something you have to consider and face. The application must have some means to ensure that the input data is semantically correct. In the usual case, the application is layered and different layers are done by different developers. Many times the same data validation logic appears on different layers, which leads to code redundancy and some management issues, such as semantic consistency. To avoid this situation, it is best to bind the validation logic to the appropriate domain model.

  Bean Validation defines the corresponding metadata model and API for JavaBean validation. The default metadata is Java Annotations, which allows you to overwrite and extend the original metadata information by using XML. In the application, you @NotNull @Max @ZipCode can ensure the correctness of the data Model (JavaBean) by using Bean Validation or your own defined constraint, for example. Constraint can be attached to fields, getter methods, classes, or interfaces above. For some specific needs, users can easily develop customized constraint. Bean Validation is a runtime data validation framework that verifies that the error message is returned immediately after validation.

What is a JSR 303-bean Validation?

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.