Annotation Interface PostalStateAbbreviation


@Documented @Target({METHOD,FIELD,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Repeatable(List.class) @Constraint(validatedBy=PostalStateAbbreviationValidator.class) public @interface PostalStateAbbreviation
This constraint will enforce the value to be equal to one of the recognized US postal state abbreviations.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
     
     
    boolean
    Set to false if the value must match case.
    Class<? extends jakarta.validation.Payload>[]
     
  • Element Details

    • message

      String message
      Default:
      "not a recognized postal state abbreviation"
    • groups

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

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

      boolean normalize
      Set to false if the value must match case.
      Default:
      true