[bv-dev] Configure validation constraints at runtime

Matt Benson mbenson at apache.org
Mon Feb 24 20:51:20 EST 2014


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't take us much to agree on an
API.

Matt
On Feb 24, 2014 6:39 PM, "Marcos Antonio" <marcos_antonio_ps at hotmail.com>
wrote:

> Let me try to be a bit more clear.
> Consider this entity:
>
> @Entity
> public class Employee
> {
>     private String _name;
>
>     // ...
>
>     @Size(min = 1, max = 50)
>     public String getName()
>     {
>         return _name;
>     }
>
>     // ...
> }
>
> 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't have this flexibility.
>
> Marcos
>
> ----------------------------
>
> From: emmanuel at hibernate.org
> Date: Mon, 24 Feb 2014 19:00:35 +0100
> Subject: Re: [bv-dev] Configure validation constraints at runtime
> To: beanvalidation-dev at lists.jboss.org; marcos_antonio_ps at hotmail.com
>
> Hi
> We don't have a defined roadmap for the future of Bean Validation. But
> that would be a nice addition in my opinion.
>
> What's your use case for it?
>
> Emmanuel
> _______________________________________________
> 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/20140224/f9ad25fd/attachment.html 


More information about the beanvalidation-dev mailing list