November 2017
Intermediate to advanced
420 pages
10h 29m
English
The Bean Validation framework allows you to specify the validation rules in the form of annotations on a field, method, or a Java class. You can either use built-in constraints offered by Bean Validation or build custom constraints by using the extension mechanisms offered by the framework. The following table summarizes the built-in constraints offered by Bean Validation that are applicable to all data types:
|
Validation constraints |
Supported Java types |
Details of the imposed constraints |
|
@NotNull |
Applicable to all Java types |
The annotated variable must not be null. |
|
@Null |
Applicable to all Java types |
The annotated variable must be null. |
The following table summarizes the ...