I've pushed another proposal to the website , it's about adding
@Past/@Future support for the date/time types added in Java 8 (java.time.*
package, added by JSR 310). The proposal essentially standardizes the
proprietary support we had in HV, plus some additions.
Please let me know what you think, especially on the questions towards the
end. Either put comments inline on the source on GitHub  or let's have a
I haven't been using JSR 310 extensively myself, so any feedback by those
who have is more than welcome.
It would be possible to add some built-in constraints to the V 2.0?
@NotBlank, @NotEmpty, @Length are used very often in projects, they are
already present in Hibernate Validator and their implementation is well
What do you think?
Here a list of the most used constraint for GitHub's projects (the numbers
change at every request but you get the idea. HV = Hibernate Validator, BV
= Bean Validation):
189'143 - BV - NotNull
56'902 - BV - Size
39'551 - HV - NotEmpty <-
20'687 - HV - NotBlank <-
17'735 - BV - Pattern
16'763 - HV - Email
16'033 - BV - Min
12'769 - HV - Length <-
7'806 - BV - Digits
4'982 - BV - Max
4'971 - BV - Past
3'598 - BV - DecimalMin
2'753 - BV - AssertTrue
2'379 - BV - DecimalMax
2'308 - BV - Future
1'999 - HV - Range
1'497 - HV - URL
< 1'000 other constraints
What do you think about the 'promotion' of fail-fast (from hibernate
validator) to the BV API?
I see frequently this 2 use cases (in the 9-5 projects) to support the
1. batch: there are a lot of batch processes that have to validate the
input data (flat file -> bean -> validation) and return for each bean only
a technical error if at least one field is not valid ('input refused').
When there are millions (e.g. payments transactions) of beans to validate
in a batch and 30-50 fields for each bean the fail-fast saves a lot of time
(and the night is never long enough for all the batches required) ;)
2. REST response: in the validation of REST services often when 2 systems
exchange data the answer in case of error is an HTTP 4xx without many
details. The fail-fast is a time and machine resources saving when your
application is accessed by (hundred of) thousand users through some
external web client (e.g. JS client).
In the do-it-yourself implementations for the 2 uses cases at the first
error an IllegalArgumentException is thrown with the information of the
first error found.
The full test of every field is very well suited for uses cases in which
there is a human to machine communication (e.g. web forms).
If your opinion is positive I can do more investigations if needed.
One of the things making life easier in Java 8 is repeatable annotations
, for instance allowing to specify several @Pattern constraints, without
the explicit usage of @Pattern.List.
The transition is very smooth for BV built-in constraints, essentially we
just need to mark them with @Repeatable, using the existing inner @List
annotations as containers. Hence I didn't bother to create a separate
proposal document but instead Guillaume and me have prepared changes for
the API and the spec already. You can find the GitHub pull requests at 
and , respectively.
Speaking of changes to the API sources, we also increased the Java version
to 8, bumped the project version to 2.0.0-SNAPSHOT and we've prepared a
change for BVAL-486  which is about not going through the provider
resolver if a specific provider type is passed into bootstrapping via
Validation#byProvider(). This was a tad inconvenient when e.g. explicitly
bootstrapping the RI under OSGi, where you still had to provide a specific
Please let me know if you have any concerns or other remarks on any of
these by the end of the week. Silence will be taken as expression of
The way we've been working towards changes in BV 1.1 was via a proposal
document for each suggested change, investigating different options, their
pros and cons etc. As needed, we'd also prototype specific approaches in
the RI. Once consensus was reached, someone would modify the spec document
as per the agreed on solution.
Proposals are simple AsciiDoc files living on the website. There are
already a couple of first proposals for BV 2.0 listed . Feedback on
these is highly welcome, either on GitHub (e.g. by commenting inline or
sending a PR with another option for a given issue) or here on the mailing
Hendrik, the one for BVAL-214 (, "Ability to validate an object and a
list of changes") may be of specific interest for JavaFX, because it should
improve cross-field validation in UI use cases (think of field "password"
should match field "password confirm"). What we should do for JavaFX in
general is a very interesting topic on its own, but probably better to
discuss that one separately.
Everyone is welcome to work on new proposals themselves. If you are
interested, check out the issues currently marked for 2.0 in the JIRA
tracker  and let me know if you'd like to get going on individual items.
This list of BV 2.0 change candidates is not cast in stone (nor will we be
able to address all of it), so if you think something should be (up high)
on that list, please speak up. My personal focus will mostly be on the Java
8 related changes for the time being, with the usage of type level
annotations being the one requiring the most consideration probably.
I'm very happy to report that the review ballot for the Bean Validation 2.0
JSR proposal was approved by the JCP EC with a great majority !
This means we can get the ball rolling and work towards an early draft of
the new spec revision. As described in , the schedule is compact and
thus we'll need to choose the things to tackle wisely. The most important
issue will be making BV fit for Java 8, but we should be able to address
some other requests besides that.
The JSR proposal  contains a few potential ideas, but I'm very eager to
learn about your requests and demands from the field. Anything which helps
to further improve usefulness and/or usability of BV is worth discussing.
Note that you don't need to be on the expert group - although you are very
welcome to join  - in order to contribute. We also value any inputs by
non-members on this mailing list, the forum  and the issue tracker .
The JCP 2.10 rules (under which this JSR operates) foresee the role of
"Contributors" which has very low entry barriers.
Before diving into details though, let's have a quick round of
introductions so everyone knows who they are dealing with :)
Let me start:
I'm working as a software engineer in the Hibernate team at Red Hat and
took over the lead of the BV JSR from Emmanuel Bernard (who will remain
active in the EG). In the past I've been contributing to the 1.1 spec (e.g.
method validation), worked on the reference implementation Hibernate
Validator (which I'm also leading now) and the 1.1 TCK. Besides BV, I'm
working on several other projects in the Hibernate universe, most notably
Hibernate OGM (providing object mapping via JPA to NoSQL stores) and
Hibernate Search (providing full-text search for JPA domain models).
I'm looking forward very much to make BV 2.0 happen together with all of
I'll soon start separate thread(s) on some first action items.
PS: Please subscribe to the beanvalidation-dev list  if you haven't done
so yet; it's where discussions mostly will take place. To be sure I've sent
this mail in copy to all those who had signalled an interest in
contributing to BV 2.0 beforehand.
I'm very glad to welcome three new members to the BV 2.0 expert group:
Hendrik Ebbers, Marco Molteni and Werner Keil!
Hendrik from Canoo Engineering AG is very active in the JavaFX field and
has lots of experiences when it comes to using BV in the context of UIs and
Marco Molteni works as an independent consultant and brings a broad range
of experience with applying BV in projects e.g. in the field of banking to
Werner Keil finally is a long-term member of the Java EE community and is
member of the JCP EC and several other expert groups, amongst them being
Java Money (JSR 354) for which we should discuss integration with BV.
Hendrik, Marco, Werner, I'll leave it to yourselves to introduce you in
greater depth and share your expectations/ideas towards BV 2.0. Welcome
again and great to have you aboard!
In a huge team effort (thanks Sanne, Guillaume et al.!) the BV spec has
been converted from DocBook into AsciiDoc.
This should make the editing and collaboration experience much nicer
(easier syntax, renders much faster, rich diff on GitHub etc.). The
AsciiDoc sources of the individual spec chapters can be found at . A
rendered HTML version is published on beanvalidation.org . Refer to the
README.md in the repo if you want to build the spec yourself locally.
It'd be a great help if everyone could take a look at the document and
report back on any formatting or other issues that may have sneaked in
during conversion. No actual changes to the wording have been made at this
point apart from adding some pointers that this is about BV 2.0 and JSR 380.
Thanks for any feedback,