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

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

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

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE_USE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * The annotated element must be an instant, date or time in the future.
 *
 * 

Now is defined by the {@link Clock} Supplier attached to the {@link Validator}. The * default clock defines the current time according to the virtual machine, applying the current * default time zone if needed. * *

Supported types are: * *

    *
  • {@code java.util.Date} *
  • {@code java.util.Calendar} *
  • {@code java.time.Instant} *
  • {@code java.time.LocalDate} *
  • {@code java.time.LocalDateTime} *
  • {@code java.time.LocalTime} *
  • {@code java.time.MonthDay} *
  • {@code java.time.OffsetDateTime} *
  • {@code java.time.OffsetTime} *
  • {@code java.time.Year} *
  • {@code java.time.YearMonth} *
  • {@code java.time.ZonedDateTime} *
* *

{@code null} elements are considered valid. */ @Constraint @Documented @Retention(RUNTIME) @Target({METHOD, FIELD, ANNOTATION_TYPE, PARAMETER, TYPE_USE}) public @interface Future { String message() default "{avaje.Future.message}"; Class[] groups() default {}; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy