[bv-dev] Value extraction open issue #2: per constraint ConstraintsApplyTo?

Guillaume Smet guillaume.smet at gmail.com
Fri Jan 13 06:22:46 EST 2017


Hi again,

On Fri, Jan 13, 2017 at 12:12 PM, Guillaume Smet <guillaume.smet at gmail.com>
wrote:

> The drawback I can see is that it adds a new reserved method to the
> @Constraint annotations. To make the migration more smooth, we could make
> it optional and test the returnType of the method before using the result.
>

After speaking with Gunnar, we would need a "valid" prefix on the name of
the method so something like validationAppliesTo would work:
@Size(3, validationAppliesTo = ANNOTATED_ELEMENT)
@Size(10, validationAppliesTo = WRAPPED_VALUE)
ListOfStrings nicknames;

-- 
Guillaume
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20170113/79a46283/attachment.html 


More information about the beanvalidation-dev mailing list