We're updating the issue view to help you get more done. 

Add a buffer parameter to the @PastOrPresent

Description

I'm suggesting a field be added to the @PastOrPresent (and @FutureOrPresent) bean validation annotations that provides a Duration which is a buffer on the time used to determine the clock value of "Present". Possibly something like:

1 @PastOrPresent(within=5, units=TimeUnit.MINUTES)

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.

Environment

None

Status

Assignee

Unassigned

Reporter

Peter Luttrell

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

6.0.7.Final

Priority

Minor