Annotation Type ConditionalValidate


@Constraint(validatedBy=com.github.microtweak.conditionalvalidator.DelegatedConditionalConstraintValidator.class) @Documented @Target(TYPE) @Retention(RUNTIME) public @interface ConditionalValidate
When a class is annotated with @ConditionalValidate, all of its fields can be annotated with any conditional constraint.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Enums that will be available during the evaluation of the expression of each conditional constraint
    Class<?>[]
    Deprecated.
    Ignored/not used by ConditionalValidation.
    Deprecated.
    Ignored/not used by ConditionalValidation.
    Class<? extends jakarta.validation.Payload>[]
    Deprecated.
    Ignored/not used by ConditionalValidation.
  • Element Details

    • contextClasses

      Class<?>[] contextClasses
      Enums that will be available during the evaluation of the expression of each conditional constraint
      Default:
      {}
    • message

      Deprecated.
      Ignored/not used by ConditionalValidation. But Bean Validation requires that every constraint has the "message" attribute.
      Default:
      ""
    • groups

      @Deprecated Class<?>[] groups
      Deprecated.
      Ignored/not used by ConditionalValidation. But Bean Validation requires that every constraint has the "groups" attribute.
      Default:
      {}
    • payload

      @Deprecated Class<? extends jakarta.validation.Payload>[] payload
      Deprecated.
      Ignored/not used by ConditionalValidation. But Bean Validation requires that every constraint has the "payload" attribute.
      Default:
      {}