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

Support possibility to include the current day/instant and set a resolution in @Future and @Past

Description

Hello,

This as already been discussed in the past, (https://hibernate.atlassian.net/browse/ANN-127). Since the support of JodaTime classes, it really makes sens to be able to specify if the annotation is inclusive/exclusive of the current instant/time/date...

For instants it may not be soooo useful, but this is really helpful for non instant date descriptions like LocalDate (but could lead to timezone problems btw...).

My simple usecase is that I have a form with a begin and a end. Both fields are LocalDate with no time. End must be after begin, and end must be either today or in the future. If we are 2013-09-10, the user must be able to select begin=2013-09-10 and end=2013-09-10 for example.
With the current exclusive annotations this is not possible and lead to the creation of a "FutureIncludingNowValidatorForReadablePartial" or a validation through a method.

I don't really know how this behavior can be modified since it's in the javax.validation, perhaps the next version of the specification could be updated?

Environment

None

Status

Assignee

Unassigned

Reporter

SébastienL

Labels

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

4.3.1.Final

Priority

Major