Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Standard Bean Validation Constraints

...

Stereotype

«Size», «PositiveOrZero», «Positive», «Pattern», «Email», «PastOrPresent», «Past», «Null», «NotNull», «NotEmpty», «NotBlank», «NegativeOrZero», «Negative», «FutureOrPresent», «Future», «AssertTrue», «AssertFalse», «Digits», «Valid», «DecimalMin», «DecimalMax», «Min», «Max», «CustomValidation», «CustomConstraint»

Applicable Elements

Parameter, Property

Stereotype «Valid» also for Class

Tagged Values

Name

Type

Description

severity

Severity

Attribute is used to define the severity if the validation fails. Possible values are: Info, Warning, Error and NotUsed

errorCode

int

Instead of using hard coded error message for validations JEAF also supports to define a JEAF X-Fun localization idLocalizationID. Using the id it is possible to use localized error messages.

Additional tagged values may be supported depending on the constraint. Those additional tagged values are equivalent to the possibilities as defined by the Java annotations (see https://javadoc.io/doc/javax.validation/validation-api/latest/index.html )

...

In addition to the already predefined constraints Java Bean Validation also supports to use custom validations.

TBD: Define how to use and model custom constraints