<div dir="ltr">+1 for adding something like this. Marcos, could you open an issue in our tracker (<a href="https://hibernate.atlassian.net/browse/BVAL">https://hibernate.atlassian.net/browse/BVAL</a>)?<div><br></div><div>If you don&#39;t want to use the current dynamic constraint APIs in HV/Apache BVAL, you might consider to generate XML constraint descriptors based on your configuration. That&#39;s a bit more tedious but portable between providers.</div>
<div><br></div><div><div>Slightly related, I see people ask every now and then for a facility for copying constraint definitions between models. Users could build this themselves if aforementioned dynamic constraint definition was possible, or we could add some more high-level support for this.</div>
</div><div><br></div><div>--Gunnar</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/2/25 Matt Benson <span dir="ltr">&lt;<a href="mailto:mbenson@apache.org" target="_blank">mbenson@apache.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I would be interested in getting dynamic constraint functionality into the BV spec. Between what Hibernate Validator offers and what is supported by the dynamic add-on for Apache BVal it shouldn&#39;t take us much to agree on an API.</p>
<span class="HOEnZb"><font color="#888888">

<p dir="ltr">Matt</p></font></span><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Feb 24, 2014 6:39 PM, &quot;Marcos Antonio&quot; &lt;<a href="mailto:marcos_antonio_ps@hotmail.com" target="_blank">marcos_antonio_ps@hotmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Let me try to be a bit more clear.<br>
Consider this entity:<br>
<br>
@Entity<br>
public class Employee<br>
{<br>
    private String _name;<br>
<br>
    // ...<br>
<br>
    @Size(min = 1, max = 50)<br>
    public String getName()<br>
    {<br>
        return _name;<br>
    }<br>
<br>
    // ...<br>
}<br>
<br>
If some client of mine asked me to change the name of the employees to accept 70 characters because 50 is not enough anymore I have to change my application for all clients. But if the bean validation specification allowed me to configure the constraints dinamically I could do this configuration on a cliente basis. All I had to do was to change the database structure for the specific column, register this fact in some table of mine and in the application startup my application would check for changes and configure the corresponding bean constraint. With static constraints (as it is today) we don&#39;t have this flexibility.<br>


<br>
Marcos<br>
<br>
----------------------------<br>
<br>
From: <a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a><br>
Date: Mon, 24 Feb 2014 19:00:35 +0100<br>
Subject: Re: [bv-dev] Configure validation constraints at runtime<br>
To: <a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss.org</a>; <a href="mailto:marcos_antonio_ps@hotmail.com" target="_blank">marcos_antonio_ps@hotmail.com</a><br>
<br>
Hi<br>
We don&#39;t have a defined roadmap for the future of Bean Validation. But that would be a nice addition in my opinion.<br>
<br>
What&#39;s your use case for it?<br>
<br>
Emmanuel<br>
_______________________________________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org" target="_blank">beanvalidation-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br></blockquote></div><br></div>