Hibernate Validator Validation Note description

Source: Internet
Author: User

Hibernate Validator is a JSR-303 one of the implementations. Add the annotations for Hibernate Validator in Formbean , as opposed to defining a validation class. Annotations are more concise and flexible.

Note description

Built-in  constraint        @Null    in bean validation    The annotated element must be  null    @NotNull      The annotated element must not be  null     @AssertTrue       The annotated element must be  true    @AssertFalse       The annotated element must be  false    @Min (value)       The annotated element must be a number, Its 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)    The annotated element must be a number whose value must be greater than or equal to the specified minimum value     @DecimalMax (value)    The annotated element 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=)    annotated elements 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=)    annotated elements must be within the appropriate range


Hibernate Validator Validation Note description

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.