@Documented @Constraint(validatedBy={NotAfterValidator.ForDate.class,NotAfterValidator.ForCalendar.class,NotAfterValidator.ForInstant.class,NotAfterValidator.ForLocalDate.class,NotAfterValidator.ForLocalDateTime.class,NotAfterValidator.ForLocalTime.class,NotAfterValidator.ForMonthDay.class,NotAfterValidator.ForOffsetDateTime.class,NotAfterValidator.ForOffsetTime.class,NotAfterValidator.ForYear.class,NotAfterValidator.ForYearMonth.class,NotAfterValidator.ForZonedDateTime.class}) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Repeatable(value=NotAfter.List.class) public @interface NotAfter
object, validates that object <= moment.
Supported types are:
DateCalendarInstantLocalDateLocalDateTimeLocalTimeMonthDayOffsetDateTimeOffsetTimeYearYearMonthZonedDateTime
null elements are considered valid.
Note that @NotAfter("now") is equivalent to @PastOrPresent.
public abstract String moment
now to use the current moment in time as defined
by the ClockProvider attached to the Validator or ValidatorFactory. The default ClockProvider defines the
current time according to the virtual machine, applying the current default time zone if needed.
For Date, this value will be parsed using DateTimeFormatter.ISO_INSTANT; for Calendar, using
DateTimeFormatter.ISO_ZONED_DATE_TIME.
public abstract String message
public abstract Class<?>[] groups
Copyright © 2021–2022. All rights reserved.