[bv-dev] Triggering method validation

Emmanuel Bernard emmanuel at hibernate.org
Fri Jan 27 12:35:10 EST 2012


That's interesting.
Though it does not fully solves what Hardy describes (or does so quite subtly) ie the fact that we validate method params and return values as opposed to the bean property.

On 27 janv. 2012, at 17:01, Sebastian Thomschke wrote:

> How about  @Guarded ?
> 
> On 27.01.2012 16:55, Hardy Ferentschik wrote:
>> IMO the annotation has to most importantly make the difference between Bean
>> and method validation clear. @ValidateConstraints doesn't.
>> 
>> 
>> On Jan 27, 2012, at 4:18 PM, Gunnar Morling wrote:
>> 
>>> One potential issue I see here is that "method validation" can also be
>>> applied to constructors.
>>> 
>>> One aspect of this is wording in the spec. There we should IMO have a
>>> preamble saying something like "method level validation can refer to
>>> methods and constructors." Another thing is the annotation name we're
>>> trying to find. Something like @ValidateMethods suggests IMO that no
>>> constructor validation is performed, or at least leaves room for
>>> interpretation.
>>> 
>>> So maybe @ValidateConstraints?
>>> 
>>> Generally I think adjectives make better binding annotation names
>>> (@Transactional being a good example) instead of imperative names like
>>> the ones discussed so far. In Seam Validation it's hence named
>>> @AutoValidating. That's surely not perfect, too, but maybe someone has
>>> another idea based on that?
>> _______________________________________________
>> beanvalidation-dev mailing list
>> beanvalidation-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
> 
> _______________________________________________
> 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