7.10.3. Comparison of Function between Bean Validation and Nablarch Validation

This section compares the validation capabilities of Nablarch with those of JSR349(external site) (external site).

Function comparison (A: Provided; B: Partially provided; C: Not provided; D: Not applicable)
Function Bean
Validation
Nablarch
Validation
JSR 349
Items to be validated can be specified A [1] A
To the manual
A
Validation can be performed
for Java Beans objects
that have a hierarchical structure
A [2] A
To the manual
A
Validation can be performed
for method arguments and return values
C [3] C [3] A
Can perform correlation validation A
To the manual
A
To the manual
A
Execution order of validation can be specified C [4] A
To the manual
A
Validation items can be switched based
on the value of a specific item
A [5] A
To the manual
A
Embedded parameters can be used
in error messages
A [6]
To the manual
A
To the manual
A
Can validate domains A
To the manual
A
To the manual
C
Can convert value types C [7] A
To the manual
C
Can normalize values C [8] A
To the manual
C
Can embed item names in error messages A
To the manual
A
To the manual
C
[1]By validating all the items of the form, receipt of invalid input values can be prevented. Therefore, using Bean Validation for executing the validation of item specification is not recommended. If validation of only specified items is required, use ValidatorUtil#validate .
[2]The response method conforms to the specifications of JSR349(external site) .
[3](1, 2) Since Nablarch always performs validation at the timing when data is received from the outside, validation for method arguments and return values is not supported.
[4]Since the execution order of validation cannot be controlled, implementation requiring expected execution order of validation should not be performed. For example, correlation validation should not be expected to be performed after item-by-item validation.
[5]Use the class-level validation function of JSR349(external site) to switch validation items by logic.
[6]EL expression can be used to embed parameters in Bean Validation.
[7]Since all property types are defined as string (Reason to define as a string)in Bean Validation, type conversion is not performed. If type conversion is required after validation, change the type using BeanUtil.
[8]Normalization is provided as a handler instead of a Bean Validation function. If normalization is needed, use Normalize Handler .