@Documented @Constraint(validatedBy={LastDayOfMonthValidator.ForDate.class,LastDayOfMonthValidator.ForCalendar.class,LastDayOfMonthValidator.ForInstant.class,LastDayOfMonthValidator.ForLocalDate.class,LastDayOfMonthValidator.ForLocalDateTime.class,LastDayOfMonthValidator.ForOffsetDateTime.class,LastDayOfMonthValidator.ForZonedDateTime.class}) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Repeatable(value=LastDayOfMonth.List.class) public @interface LastDayOfMonth
object
, validates that object.dayOfMonth == object.month.lastDay
.
Supported types are:
MonthDay
is explicitly not supported for the same reason that it implements TemporalAccessor
and not
Temporal
.
null
elements are considered valid.
public abstract String message
public abstract Class<?>[] groups
public abstract String zoneId
system
for the value returned by ZoneId.systemDefault()
, provided
for the zone id
from the actual value, or otherwise a value that is accepted by ZoneId.of(String)
for a specific zone id.
Calendar
, OffsetDateTime
and ZonedDateTime
, if the zone id is not
provided
, the value is converted to the given zone id before extracting the day of the month.Date
and Instant
, no zone id is available, so provided
is not allowed.LocalDate
, LocalDateTime
, Month
and MonthDay
, no zone id is
applicable, so only the default value (system
) is allowed.Copyright © 2021–2022. All rights reserved.