| I'm suggesting a field be added to the @PastOrPresent bean validation annotation that provides a Duration which is a buffer on the time used to determine the clock value of "Present". Possibly something like:
@PastOrPresent(within=Duration.ofMinutes(1))
I know that you can provide your own clock provider as explained here but that will impact all clock requests and you may not want all requests with the same duration. Such as if you're validating an Instant, some cases you may want precision to the minute but other cases you may want it to the millisecond. |