New EG member: Otavio Santana
by Gunnar Morling
Hi,
Please join me in welcoming our newest EG member, Otavio Santana.
Besides other things, Otavia is a JUG Leader in Brazil, Java Champion,
expert in several specifications and JCP executive member.
Otavia, it's great to have you as part of the team. If you like, introduce
yourself in more depth and let us know what your wishes and ideas
are towards BV 2.0.
Cheers and welcome again,
--Gunnar
8 years, 2 months
Invalid value interpolation
by Michael Nascimento
Hi guys,
I've searched the spec to make sure this hasn't been solved yet and
apparently it had not, but please let me know if I'm wrong.
I remember last year in my previous company struggling with the fact
there was no way to include the actual invalid value as part of the
message interpolation process. This is needed in many scenarios,
especially when the actual invalid value is somehow derived or
computed and the only way to report the error is by returning it in
the interpolated message.
Do you guys see any value in providing support for that in the spec?
Regards,
Michael
8 years, 2 months
Promote fail fast?
by Marco Molteni
Hi guys,
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
request ;)
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.
Cheers
Marco
8 years, 2 months
Making built-in constraints repeatable
by Gunnar Morling
Hi all,
One of the things making life easier in Java 8 is repeatable annotations
[1], 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 [2]
and [3], 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 [4] 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
provider resolver.
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
agreement :)
Cheers,
--Gunnar
[1] https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html
[2] https://github.com/beanvalidation/beanvalidation-api/pull/65
[3] https://github.com/beanvalidation/beanvalidation-spec/pull/111
[4] https://github.com/beanvalidation/beanvalidation-api/pull/66
8 years, 2 months
Some first proposals
by Gunnar Morling
Hi all,
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 [1]. 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
list.
Hendrik, the one for BVAL-214 ([2], "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 [3] 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.
Cheers,
--Gunnar
[1] http://beanvalidation.org/proposals/
[2] http://beanvalidation.org/proposals/BVAL-214
[3]
https://hibernate.atlassian.net/issues/?jql=project%20%3D%20BVAL%20AND%20...
8 years, 2 months
New EG member: Christian Kaltepoth
by Gunnar Morling
Hi,
I'd like to say a warm welcome to our latest expert group member: Christian
Kaltepoth!
Christian works with ingenit GmbH in Dortmund, Germany, is a long time user
of Java EE and also serves in the expert group for MVC 1.0 (JSR 371). I'm
sure we can use his connections with the MVC and JAX-RS communities to
further drive the integration of BV and these techs.
Christian, I'm very happy to have you aboard and please feel free to
introduce yourself in more depth if you like and let us know what your
wishes and ideas are towards BV 2.0.
Cheers,
--Gunnar
8 years, 2 months