Re: [bv-dev] BV 2.0 - Add constraints?
by Otávio Gonçalves de Santana
I sent to adopt JSR email list and share it on social media.
https://twitter.com/otaviojava/status/776549007799701504
On 15 Sep 2016 12:00, "Otávio Gonçalves de Santana" <
otaviopolianasantana(a)gmail.com> wrote:
> Nice form!!
> I'm sharing it in adopt JSR program email list.
>
> On 15 Sep 2016 03:46, "Gunnar Morling" <gunnar(a)hibernate.org> wrote:
>
>> Hi,
>>
>> I've created a survey using Google Forms on our blog (staging atm.):
>> http://staging.beanvalidation.org/news/2016/09/15/
>> which-constraints-to-add/
>>
>> Feedback welcome. Unless I hear back otherwise, I'll push it to the
>> production site tomorrow and then let's announce it on Twitter to get some
>> answers. I'd leave it open for two weeks (allowing people to reply after J1
>> which is next week), which should be plenty of time.
>>
>> One question I have is should we allow anonymous voting or require
>> logging in via Google. The latter prevents double votes, but it raises the
>> level for participation and don't think people feel motivated to vote
>> several times on this topic really.
>>
>> Andy thoughts?
>>
>> Thanks,
>>
>> --Gunnar
>>
>>
>> 2016-09-14 12:02 GMT+02:00 Marco Molteni <moltenma(a)gmail.com>:
>>
>>> I agree about @Length. It was listed only because of the frequency. I'd
>>> limit the addition to @NotBlank and @NotEmpty.
>>>
>>> On Wed, Sep 14, 2016 at 11:52 AM, Gunnar Morling <gunnar(a)hibernate.org>
>>> wrote:
>>>
>>>> Btw. I don't see a strong reason for @Length, as we have @Size in the
>>>> spec for it already.
>>>>
>>>> I think it's commonly used in older applications which migrated from HV
>>>> 3.x (proprietary API) to HV 4.x (BV RI) and kept using the legacy
>>>> constraint instead of using the spec'-ed @Size.
>>>>
>>>> 2016-09-14 11:48 GMT+02:00 Gunnar Morling <gunnar(a)hibernate.org>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I like the idea of collecting some more feedback from the community.
>>>>>
>>>>> A blog post may be an option, though I reckon feedback will be sparse
>>>>> based on previous experiences. I'd rather do a survey as it's more
>>>>> actionable for people. Either on Twitter (though that seems a bit limited)
>>>>> or using Google Forms [1], which is my preference.
>>>>>
>>>>> I'll prepare something and share it with you soon. If the survey looks
>>>>> good, we can promote it on Twitter and during the Hackergarten at J1 (of
>>>>> course talking to people in person there will be a great chance to learn
>>>>> about their wishes, too).
>>>>>
>>>>> It'd be nice if we got some insight from that.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> --Gunnar
>>>>>
>>>>> [1] https://docs.google.com/forms/
>>>>>
>>>>>
>>>>> 2016-09-09 11:34 GMT+02:00 Marco Molteni <moltenma(a)gmail.com>:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> which is the best / common way to get a representative feedback
>>>>>> according to your experience?
>>>>>> Thanks!
>>>>>>
>>>>>> On Thu, Sep 8, 2016 at 7:44 AM, Christian Kaltepoth <
>>>>>> christian(a)kaltepoth.de> wrote:
>>>>>>
>>>>>>> I also think that adding the most popular 3rd party constraints
>>>>>>> directly to the spec is a good thing. Especially @NotBlank and @NotEmpty.
>>>>>>>
>>>>>>> However, I also agree that it would be nice to gather more feedback
>>>>>>> from the community to learn which constraints people would like to see in
>>>>>>> the spec.
>>>>>>>
>>>>>>> 2016-09-06 20:50 GMT+02:00 Michael Nascimento <misterm(a)gmail.com>:
>>>>>>>
>>>>>>>> +1 to including them.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Michael
>>>>>>>>
>>>>>>>> On Mon, Aug 22, 2016 at 2:37 PM, Marco Molteni <moltenma(a)gmail.com>
>>>>>>>> wrote:
>>>>>>>> > Hi all,
>>>>>>>> >
>>>>>>>> > 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
>>>>>>>> > defined.
>>>>>>>> >
>>>>>>>> > 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
>>>>>>>> >
>>>>>>>> > Thanks
>>>>>>>> >
>>>>>>>> > Cheers
>>>>>>>> >
>>>>>>>> > Marco
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > _______________________________________________
>>>>>>>> > beanvalidation-dev mailing list
>>>>>>>> > beanvalidation-dev(a)lists.jboss.org
>>>>>>>> > https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>>>>>>>> _______________________________________________
>>>>>>>> beanvalidation-dev mailing list
>>>>>>>> beanvalidation-dev(a)lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Christian Kaltepoth
>>>>>>> Blog: http://blog.kaltepoth.de/
>>>>>>> Twitter: http://twitter.com/chkal
>>>>>>> GitHub: https://github.com/chkal
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> beanvalidation-dev mailing list
>>>>>>> beanvalidation-dev(a)lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> beanvalidation-dev mailing list
>>>>>> beanvalidation-dev(a)lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> beanvalidation-dev mailing list
>>>> beanvalidation-dev(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> beanvalidation-dev mailing list
>>> beanvalidation-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>>>
>>
>>
>> _______________________________________________
>> beanvalidation-dev mailing list
>> beanvalidation-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>>
>
7 years, 8 months
Support for constraints on container values (e.g. Collection<@Email String>)
by Emmanuel Bernard
Hi all,
I and a few others have been working on a proposal to support things
like Collection<@Email String> and Optional<@Email String>. This is
more complicated that it seems at first glance.
Instead of doing an ad-hoc support for the various collection types,
Optional and the JavaFX Properties, we quickly decided to define the
notion of container and the ability to declare constraints on contained
elements to validate them.
This lead to two main proposals that you can read at
http://beanvalidation.org/proposals/BVAL-508/
This is a relatively long read, you can start by ignoring "alternative"
options for your first pass. We are very interested in feedback at this
stage as we have been pushing these proposal very far already and they
would need to become part of the spec as next step.
Let me know of what you think, questions, remarks etc.
In particular, I'm interested in what you think of the following.
The capability to define custom containers.
The extractor approach vs its alternative.
The concepts of @ConstraintsAppliesTo(COMTAINED) used for JavaFX and for
subclasses of containers.
@Valid, in particular the legacy and new forms and how to handle the
transition.
And finally, but a big one, what do you think of proposal 1 vs proposal
2. The latter being more generic but with more open questions (and a
less elaborated at this stage).
Emmanuel
8 years
Website: Removed proposals from BV 1.1
by Gunnar Morling
Hi,
We still had several proposal documents from the 1.1 revision laying around
on the website. I've removed those now (they are still in the Git history
for historical purposes of course).
Hendrik stepped up and converted all current proposals into AsciiDoc.
Thanks a lot!
Cheers,
--Gunnar
8 years, 2 months
Re: [bv-dev] Meeting at JavaOne?
by Otávio Gonçalves de Santana
Just trying to send the email again.
On Thu, Sep 15, 2016 at 10:12 AM, Otávio Gonçalves de Santana <
otaviopolianasantana(a)gmail.com> wrote:
> On 15 Sep 2016 08:24, "Gunnar Morling" <gunnar(a)hibernate.org> wrote:
> >
> > Hi all,
> >
> > JavaOne is approaching quickly and I just wanted to quickly sync on the
> Hackergarten event (as I won't be there).
> >
> > It's my understanding that Michael and Otavio will be leading it, right?
> Do you have any kind of agenda or plan of the things you'd like to discuss
> during this event?
> Yes, we'll be there.
> Initially, the main goal of this JSR, the current issue and then we're
> open to hear suggestion. The result I'll write an email about it.
> >
> > I think it'd be nice to discuss the proposals done already (the one on
> containers/collections being the most prominent one) and of course gather
> feedback in general (e.g. by pointing people to the constraint survey or
> the general roadmap of issues as described in the JSR itself and as
> expressed by issues in the BVAL tracker assigned to 2.x).
> >sure, that's good point.
>
> > If you want to discuss anything prior to the event just let me know (we
> also can do a quick Hangout if you like). Many thanks for driving this
> initiative, that's much appreciated!
> > Yes, when do you can?
> I'm free on Saturday. Please send us a Google invite about it. I'm
> currently at San Francisco.
>
> > Looking forward to any feedback and outcome from this event,
> >
> > --Gunnar
> >
> >
> > 2016-09-01 16:31 GMT+02:00 Hendrik Ebbers <hendrik.ebbers(a)me.com>:
> >>
> >> Hi,
> >>
> >> I will be at J1 and will attend the hackergarten. I know David and can
> chat with him about the proposal (maybe even before J1). I will have a
> deeper look at this one the next days.
> >>
> >> Cheers,
> >>
> >> Hendrik
> >>
> >>
> >>> Am 01.09.2016 um 10:14 schrieb Gunnar Morling <gunnar(a)hibernate.org>:
> >>>
> >>> Hi,
> >>>
> >>> Unfortunately I won't be able to attend JavaOne myself, but still it
> should be a great opportunity for members of the BV EG and community to
> meet and exchange.
> >>>
> >>> As per [1] there is a BV 2.0 Hackergarten event scheduled for Tuesday
> the 20th, led by Michael Nascimento. Thanks for taking this initiative,
> Michael!
> >>>
> >>> Interesting things to discuss and explore might be proposals written
> by then (e.g. the one around List<@Email>, Emmanuel is working on updating
> this one) and things like ordering of constraints (BVAL-248, [2]) or David
> Blevins' proposal around using Lambdas (BVAL-515, [3]). David should be
> there, so make sure to get hold of him :)
> >>>
> >>> Another interesting topic is integration with other specs/techs (e.g.
> javax.money or JavaFX). Specifically, there are several pending issues
> around the integration of BV and JAX-RS:
> >>>
> >>> * Provides means to disable BV during JAX-RS lifecycle validation
> (BVAL-520, [4])
> >>> * Provide facility for more flexible HTTP error codes when using BV
> with JAX-RS (BVAL-518, [5])
> >>> * Pass the request locale to BV's MessageInterpolator
> >>>
> >>> Mostly these things would have to be done on the JAX-RS side, so it
> would be great to have a chat with them if there is the chance for it.
> >>>
> >>> Apart from that, essentially anything would be great which helps with
> forming a picture of the community's needs and requirements.
> >>>
> >>> Thoughts?
> >>>
> >>> Cheers,
> >>>
> >>> --Gunnar
> >>>
> >>> [1] http://linkis.com/community.oracle.com/bhe4K
> >>> [2] https://hibernate.atlassian.net/browse/BVAL-248
> >>> [3] https://hibernate.atlassian.net/browse/BVAL-515
> >>> [4] https://hibernate.atlassian.net/browse/BVAL-520
> >>> [5] https://hibernate.atlassian.net/browse/BVAL-518
> >>>
> >>> _______________________________________________
> >>> beanvalidation-dev mailing list
> >>> beanvalidation-dev(a)lists.jboss.org
> >>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
> >>
> >>
> >>
> >> _______________________________________________
> >> beanvalidation-dev mailing list
> >> beanvalidation-dev(a)lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
> >
> >
> >
> > _______________________________________________
> > beanvalidation-dev mailing list
> > beanvalidation-dev(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
>
--
Otávio Gonçalves de Santana
twitter: http://twitter.com/otaviojava
site: *http://about.me/otaviojava <http://about.me/otaviojava>*
8 years, 2 months
Meeting at JavaOne?
by Gunnar Morling
Hi,
Unfortunately I won't be able to attend JavaOne myself, but still it should
be a great opportunity for members of the BV EG and community to meet and
exchange.
As per [1] there is a BV 2.0 Hackergarten event scheduled for Tuesday the
20th, led by Michael Nascimento. Thanks for taking this initiative, Michael!
Interesting things to discuss and explore might be proposals written by
then (e.g. the one around List<@Email>, Emmanuel is working on updating
this one) and things like ordering of constraints (BVAL-248, [2]) or David
Blevins' proposal around using Lambdas (BVAL-515, [3]). David should be
there, so make sure to get hold of him :)
Another interesting topic is integration with other specs/techs (e.g.
javax.money or JavaFX). Specifically, there are several pending issues
around the integration of BV and JAX-RS:
* Provides means to disable BV during JAX-RS lifecycle validation
(BVAL-520, [4])
* Provide facility for more flexible HTTP error codes when using BV with
JAX-RS (BVAL-518, [5])
* Pass the request locale to BV's MessageInterpolator
Mostly these things would have to be done on the JAX-RS side, so it would
be great to have a chat with them if there is the chance for it.
Apart from that, essentially anything would be great which helps with
forming a picture of the community's needs and requirements.
Thoughts?
Cheers,
--Gunnar
[1] http://linkis.com/community.oracle.com/bhe4K
[2] https://hibernate.atlassian.net/browse/BVAL-248
[3] https://hibernate.atlassian.net/browse/BVAL-515
[4] https://hibernate.atlassian.net/browse/BVAL-520
[5] https://hibernate.atlassian.net/browse/BVAL-518
8 years, 2 months
Rake
by Hendrik Ebbers
Hi all,
any idea how to install rake on a mac. Based on the readme for the bean validation.org repo I ended in this:
Hendriks-MacBook-Pro-2:beanvalidation.org hendrikebbers$ rake check
/Users/hendrikebbers/git/beanvalidation.org/Rakefile:105: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Bundler gem not installed. Run 'gem install bundler first'
Hendriks-MacBook-Pro-2:beanvalidation.org hendrikebbers$ rake preview
bundle exec awestruct -d
/Users/hendrikebbers/git/beanvalidation.org/Rakefile:133: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Using profile: development
Generating site: http://localhost:4242
bundler: failed to load command: awestruct (/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bin/awestruct)
LoadError: Could not open library 'libc.dylib': dlopen(libc.dylib, 5): image not found
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/library.rb:133:in `block in ffi_lib'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `map'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `ffi_lib'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native/lib_c.rb:5:in `<module:LibC>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native/lib_c.rb:3:in `<module:Native>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native/lib_c.rb:2:in `<module:SassC>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native/lib_c.rb:1:in `<top (required)>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native.rb:32:in `require_relative'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native.rb:32:in `<module:Native>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native.rb:4:in `<module:SassC>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc/native.rb:3:in `<top (required)>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc.rb:5:in `require_relative'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/gems/sassc-1.8.4/lib/sassc.rb:5:in `<top (required)>'
/Users/hendrikebbers/git/beanvalidation.org/_ext/pipeline.rb:3:in `require'
/Users/hendrikebbers/git/beanvalidation.org/_ext/pipeline.rb:3:in `load_pipeline'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bundler/gems/awestruct-0dbfd2ad2061/lib/awestruct/engine.rb:254:in `eval'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bundler/gems/awestruct-0dbfd2ad2061/lib/awestruct/engine.rb:254:in `load_pipeline'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bundler/gems/awestruct-0dbfd2ad2061/lib/awestruct/engine.rb:67:in `run'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bundler/gems/awestruct-0dbfd2ad2061/lib/awestruct/cli/generate.rb:21:in `run'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bundler/gems/awestruct-0dbfd2ad2061/lib/awestruct/cli/invoker.rb:128:in `invoke_generate'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bundler/gems/awestruct-0dbfd2ad2061/lib/awestruct/cli/invoker.rb:52:in `invoke!'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bundler/gems/awestruct-0dbfd2ad2061/bin/awestruct:9:in `<top (required)>'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bin/awestruct:23:in `load'
/Users/hendrikebbers/git/beanvalidation.org/.bundle/ruby/2.0.0/bin/awestruct:23:in `<top (required)>'
rake aborted!
ERROR: Running Awestruct failed.
/Users/hendrikebbers/git/beanvalidation.org/Rakefile:133:in `run_awestruct'
/Users/hendrikebbers/git/beanvalidation.org/Rakefile:61:in `block in <top (required)>'
Tasks: TOP => preview
(See full trace by running task with --trace)
Hendriks-MacBook-Pro-2:beanvalidation.org hendrikebbers$
8 years, 2 months
BV 2.0 - Add constraints?
by Marco Molteni
Hi all,
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
defined.
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
Thanks
Cheers
Marco
8 years, 2 months