@Documented @Constraint(validatedBy={AfterValidator.ForDate.class,AfterValidator.ForCalendar.class,AfterValidator.ForInstant.class,AfterValidator.ForLocalDate.class,AfterValidator.ForLocalDateTime.class,AfterValidator.ForLocalTime.class,AfterValidator.ForMonthDay.class,AfterValidator.ForOffsetDateTime.class,AfterValidator.ForOffsetTime.class,AfterValidator.ForYear.class,AfterValidator.ForYearMonth.class,AfterValidator.ForZonedDateTime.class}) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Repeatable(value=After.List.class) public @interface After
object
, validates that object > moment
.
Supported types are:
Date
Calendar
Instant
LocalDate
LocalDateTime
LocalTime
MonthDay
OffsetDateTime
OffsetTime
Year
YearMonth
ZonedDateTime
null
elements are considered valid.
Note that @After("now")
is equivalent to @
Future
.
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.