Annotation Type OneOf

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value
      The set of valid values.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Class<?>[] groups
      The groups the constraint belongs to.
      boolean ignoreCase
      Whether or not to ignore case.
      boolean ignoreWhitespace
      Whether or not to ignore leading and trailing whitespace.
      String message
      The validation message for this constraint.
      Class<? extends jakarta.validation.Payload>[] payload
      The payloads of this constraint.
    • Element Detail

      • value

        String[] value
        The set of valid values.
        Returns:
        an array containing the valid string values
      • message

        String message
        The validation message for this constraint.
        Returns:
        the message
        Default:
        "must be one of {value}"
      • groups

        Class<?>[] groups
        The groups the constraint belongs to.
        Returns:
        an array of classes representing the groups
        Default:
        {}
      • payload

        Class<? extends jakarta.validation.Payload>[] payload
        The payloads of this constraint.
        Returns:
        the array of payload classes
        Default:
        {}
      • ignoreCase

        boolean ignoreCase
        Whether or not to ignore case.
        Returns:
        if the case should be ignored
        Default:
        false
      • ignoreWhitespace

        boolean ignoreWhitespace
        Whether or not to ignore leading and trailing whitespace.
        Returns:
        if leading and trailing whitespaces should be ignored
        Default:
        false