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