[bv-dev] [Java 8] How about support java.time in @Future and @Past?
Hardy Ferentschik
hardy at hibernate.org
Thu Mar 27 07:12:22 EDT 2014
Hi Markus,
thanks for your feedback. Supporting new Java 8 data types seems to be a good candidate for
the next iteration of the Bean Validation spec. If this version will align with Java 8, there are other
candidates as well. For example the ability to annotate collection elements (List<@Min(4) String> foo)
or handling the validation of @Optional values.
At the moment the plan for an new spec release are still in the making. However, in Hibenrate Validator
we already started the work on supporting Java 8 [1], including the new date and time types [2].
Hibernate Validator 5.2 should make this functionality available, probably well before there will be a new spec version.
Once HV 5.2 is available you should be able to upgrade even without a new version of the Bean Validation spec.
—Hardy
[1] https://hibernate.atlassian.net/browse/HV-825
[2] https://hibernate.atlassian.net/browse/HV-874
On 27 Jan 2014, at 06:27, Markus Malkusch <markus at malkusch.de> wrote:
> Dear bean validation
>
> Java bean validation 1.1 @Future and @Past constraints are restricted to
> Calendar and Date only. Adding custom validators for Java 8's java.time types
> is possible as described in 8.1.2. Overriding constraint definitions in XML.
> But I'm just too lazy to do this for my own. I would love to see a new spec
> which includes the Java 8's java.time classes.
>
> Sincerly Markus Malkusch_______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
More information about the beanvalidation-dev
mailing list