[bv-dev] Proposal for supporting new Java 8 date/time types
christian at kaltepoth.de
Sat Sep 24 04:10:43 EDT 2016
this first version looks great so far. Thanks a lot for this.
2016-09-23 22:08 GMT+02:00 Michael Nascimento <misterm at gmail.com>:
> Hi guys,
> I was finally able to write something before taking my flight this
> morning. Let me know what you think:
> On Fri, Sep 23, 2016 at 4:04 AM, John Hendrikx <hjohn at xs4all.nl> wrote:
> >> > Another thing: If @Future and @Past support types like LocalDate,
> >> YearMonth and Year, should we perhaps enhance them to allow the user
> >> to specify that the "current" year/month/date should also be valid?
> >> That's a very good point, too! This one has been specifically
> >> brought up with https://hibernate.atlassian.net/browse/BVAL-466
> >> <https://hibernate.atlassian.net/browse/BVAL-466>. It seems
> >> to add an annotation parameter for this given the support for these
> >> non-instant types. When looking at your example, I'd have a hard
> >> time though to reason the exact semantics of inclusive(). I hope we
> >> could find something more descriptive?
> >> I agree that "inclusive" isn't a good name. I'm open for any ideas. ;-)
> > Perhaps just provide annotations for their inverse.
> > NotFuture/NotInFuture = past + now (past inclusive)
> > NotPast/NotInPast = future + now (future inclusive)
> > Or perhaps a general modifying annotation, that can be applied to
> > everything to invert the matching logic:
> > @Not
> > Inverts the matching logic on this element.
> > @Not @Past
> > @Not @Pattern("TRUE|FALSE") // hard to write without the @Not
> > --John
> > _______________________________________________
> > beanvalidation-dev mailing list
> > beanvalidation-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the beanvalidation-dev