Java Bean Validation

How to use standard validations

JEAF and JEAF Generator also support of Java Bean Validation (JSR-380). This means that for every constraint defined by Java Bean validation there also is a matching stereotype that can be used in UML model. To make use of them you simply have to apply them on attributes, parameters or association ends.

Depending on the concrete constraint it may be required to define additional information as tagged values.

As we do not want to repeat documentation of JSR-380 please have a look on the constraints defined there. The stereotypes of JEAF Meta Model contain an tagged value for every property of the JSR-380 annotations: Bean Validation API 2.0.1.Final

In addition to the standard features it is also possible to define a JEAF X-Fun error code instead of a plain message. JEAF will convert this error code into a matching error message if the validation fails.

 

For further information please also refer to:

 

How to model and use custom validations

TBD: Define how to use and model custom constraints