Hibernate validation usage of each annotation

Source: Internet
Author: User

The constraint that is built into the Bean Validation @Null The annotated element must beNULL@NotNull The annotated element must not beNULL@AssertTrue The annotated element must be atrue@AssertFalse The annotated element must be afalse@Min (value) The annotated element must be a number whose value must be greater than or equal to the specified minimum value @Max (value) The annotated element must be a number whose value must be less than or equal to the specified maximum value @DecimalMin (value) is commented The element must be a number whose value must be greater than or equal to the specified minimum value @DecimalMax (value) the element being commented on must be a number whose value must be less than or equal to the specified maximum value @Size (Max=, min=The size of the annotated element must be within the specified range @Digits (integer, fraction) The annotated element must be a number whose value must be within an acceptable range @Past the annotated element must be a past date @Future The annotated element must be a future date @Pattern (Regex=,flag=The annotated element must conform to the specified regular expression Hibernate Validator additional constraint @NotBlank (message=Verify that the string is not NULL, and that the length must be greater than 0 @Email The annotated element must be an e-mail address @Length (min=,max=The size of the annotated string must be within the specified range @NotEmpty the annotated string must be non-empty @Range (min=,max=,message=) The annotated element must be within the appropriate range

Hibernate validation usage of each annotation

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.