[bv-dev] BV - Parameter validation being executed twice

Gunnar Morling gunnar at hibernate.org
Mon Apr 29 15:33:01 EDT 2019


Juliano,

This question would be better suited for the WildFly community (see
https://wildfly.org/gethelp/). On first thought I'd expect the constraint
to be validated only once, but it's hard to tell without knowing more
details (where exactly is that constraint placed etc.)

--Gunnar


Am Mo., 29. Apr. 2019 um 20:12 Uhr schrieb Juliano <julianomqs at gmail.com>:

> Hello,
>
> Sorry if this is the wrong place to post this.
>
> I'm developing a JAX-RS webservice endpoint, and I'm using BeanValidation
> to validate a bean sent as a method parameter to a POST method, like this:
>
> @POST
> public void save(@NotNull @Valid Customer customer) {
>     // ... more code ....
> }
>
> Then I noticed a custom constraint I created was being executed twice
> within that bean.
>
> Is this the default behavior?
>
> Can constraints be executed more than once?
>
> INFO: I'm using BeanValidation 2.0 with WildFly 16.
>
> Thanks a lot.
>
> Atenciosamente,
>
> Juliano Marques
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Livre
> de vírus. www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>.
> <#m_5246043363157558375_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20190429/9ba136fc/attachment.html 


More information about the beanvalidation-dev mailing list