All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.avaje.validation.constraints.Length Maven / Gradle / Ivy

The newest version!
package io.avaje.validation.constraints;

import java.lang.annotation.*;

import static java.lang.annotation.ElementType.*;

/**
 * The annotated string length must be between the specified boundaries (included).
 *
 * 

Supported types are: *

    *
  • {@code CharSequence} (length of character sequence is evaluated) *
  • {@code String} (length of character sequence is evaluated) *
*/ @Constraint @Target({METHOD, FIELD, ANNOTATION_TYPE, PARAMETER, TYPE_USE}) @Retention(RetentionPolicy.RUNTIME) @Repeatable(Length.List.class) public @interface Length { String message() default "{avaje.Length.message}"; Class[] groups() default {}; int min() default 0; int max() default Integer.MAX_VALUE; @Target({ElementType.METHOD, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) @Documented @interface List { Length[] value(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy