<div dir="ltr">Hi Michael,<div><br></div><div>Great proposal! I like your scheme for capturing all types to be supported and how you describe the validation routine.</div><br>Some questions/thoughts:<br><br>* Why is it that you use compareTo() over isAfter()/isBefore()? I reckon the latter are not as widely supported amongst JSR 310 types?<br>* What are the shortcomings meant by "2.1.1. Working around limitations in ConstraintValidator that prevent the above strategy"?<div>* What do you have in mind with regards to "2.4. "Simple" TemporalAmount implementations support"?</div><div>* We need a way to expose the ClockProvider to ConstraintValidator implementations (injection via CDI may be used, but BV must be usable without CDI, too). Adding a new method ConstraintValidatorContext#getClockProvider() seems the most obvious choice (currently the RI provides HibernateConstraintValidatorContext#getTimeProvider() for that purpose).</div><div>* Regarding Duration/Period, how about handling this separately? It seems we could add this in a second step, allowing to align quickly on the @Future/@Past additions and add support for it to the RI.</div><div><br></div><div>--Gunnar</div><div><br></div><div><div><br><div><br></div><div><br><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-24 10:31 GMT+02:00 Gunnar Morling <span dir="ltr"><<a href="mailto:gunnar@hibernate.org" target="_blank">gunnar@hibernate.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Awesome, many thanks Michael! Going to look into the proposal asap.<span class="HOEnZb"><font color="#888888"><div><br></div><div>--Gunnar</div><div><br></div></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2016-09-23 22:08 GMT+02:00 Michael Nascimento <span dir="ltr"><<a href="mailto:misterm@gmail.com" target="_blank">misterm@gmail.com</a>></span>:<br></span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys,<br>
<br>
I was finally able to write something before taking my flight this<br>
morning. Let me know what you think:<br>
<br>
<a href="https://github.com/sjmisterm/beanvalidation.org/blob/760cd54cb1f00bac1ae88d749d01cf80fe79f899/proposals/BVAL-496.adoc" rel="noreferrer" target="_blank">https://github.com/sjmisterm/b<wbr>eanvalidation.org/blob/760cd54<wbr>cb1f00bac1ae88d749d01cf80fe79f<wbr>899/proposals/BVAL-496.adoc</a><br>
<br>
Regards,<br>
Michael<br>
<div><div><br>
On Fri, Sep 23, 2016 at 4:04 AM, John Hendrikx <<a href="mailto:hjohn@xs4all.nl" target="_blank">hjohn@xs4all.nl</a>> wrote:<br>
><br>
>> > Another thing: If @Future and @Past support types like LocalDate,<br>
>> YearMonth and Year, should we perhaps enhance them to allow the user<br>
>> to specify that the "current" year/month/date should also be valid?<br>
>><br>
>> That's a very good point, too! This one has been specifically<br>
>> brought up with <a href="https://hibernate.atlassian.net/browse/BVAL-466" rel="noreferrer" target="_blank">https://hibernate.atlassian.ne<wbr>t/browse/BVAL-466</a><br>
>> <<a href="https://hibernate.atlassian.net/browse/BVAL-466" rel="noreferrer" target="_blank">https://hibernate.atlassian.<wbr>net/browse/BVAL-466</a>>. It seems sensible<br>
>> to add an annotation parameter for this given the support for these<br>
>> non-instant types. When looking at your example, I'd have a hard<br>
>> time though to reason the exact semantics of inclusive(). I hope we<br>
>> could find something more descriptive?<br>
>><br>
>><br>
>> I agree that "inclusive" isn't a good name. I'm open for any ideas. ;-)<br>
><br>
> Perhaps just provide annotations for their inverse.<br>
><br>
> NotFuture/NotInFuture = past + now (past inclusive)<br>
> NotPast/NotInPast = future + now (future inclusive)<br>
><br>
> Or perhaps a general modifying annotation, that can be applied to<br>
> everything to invert the matching logic:<br>
><br>
> @Not<br>
><br>
> Inverts the matching logic on this element.<br>
><br>
> @Not @Past<br>
> @Not @Pattern("TRUE|FALSE") // hard to write without the @Not<br>
><br>
> --John<br>
> ______________________________<wbr>_________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a><br>
______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss<wbr>.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/beanvalidation-dev</a><br>
</div></div></blockquote></div></div></div><br></div>
</blockquote></div><br></div>