Annotation Interface NotEmpty


The annotated element must not be null nor empty.

Supported types are:

  • CharSequence (length of character sequence is evaluated)
  • Collection (collection size is evaluated)
  • Map (map size is evaluated)
  • Array (array length is evaluated)
Since:
2.0
Author:
Emmanuel Bernard, Hardy Ferentschik
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Defines several @NotEmpty constraints on the same element.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
     
     
    Class<? extends Payload>[]
     
  • Element Details

    • message

      String message
      Default:
      "{jakarta.validation.constraints.NotEmpty.message}"
    • groups

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

      Class<? extends Payload>[] payload
      Default:
      {}