Annotation Interface ConditionalEmpty


Checks if specified field is empty when conditionField has the value which is equal to conditionValue, or the value fieldWhichHoldsConditionalValue has.
See Also:
  • Element Details

    • field

      String field
      Validated field.
      Returns:
      field name
    • conditionField

      String conditionField
      Conditional field. Validation check is executed only when the value of this field is equal to the value which fieldWhichHoldsConditionalValue holds.
      Returns:
      condition field name
    • conditionValue

      String[] conditionValue
      Validation check is executed only when the value conditionField holds is equal to to it.

      You can use this value when the datatype of conditionField is String. Otherwise you should use fieldWhichHoldsConditionalValue.

      Multiple values can be set to the parameter. In that case validation check is executed when one of the values are equal to the value of conditionField.

      Returns:
      value
      Default:
      {"[null]"}
    • conditionValueIsEmpty

      boolean conditionValueIsEmpty
      Validation check is executed only when it's true and the value conditionField holds is empty.
      Returns:
      boolean
      Default:
      false
    • conditionValueIsNotEmpty

      boolean conditionValueIsNotEmpty
      Validation check is executed only when it's true and the value conditionField holds is not empty.
      Returns:
      boolean
      Default:
      false
    • fieldHoldingConditionValue

      String fieldHoldingConditionValue
      See conditionField.

      Originally The datatype of a parameter of annotation can only be String and primitive datatypes. It cannot be Object.

      Returns:
      value
      Default:
      "[null]"
    • message

      String message
      Returns message ID.
      Returns:
      message ID
      Default:
      "{jp.ecuacion.validation.constraints.ConditionalEmpty.message}"
    • groups

      Class<?>[] groups
      Returns groups.
      Returns:
      groups
      Default:
      {}
    • payload

      Class<? extends jakarta.validation.Payload>[] payload
      Returns payload.
      Returns:
      payload
      Default:
      {}