[bv-dev] Javascript export of bean validation rules

Hardy Ferentschik hardy at hibernate.org
Fri Jun 29 05:23:49 EDT 2012


On Jun 28, 2012, at 6:07 PM, Edward Burns wrote:

>>>> MI> On Thu, 28 Jun 2012 10:15:14 +0200, Hardy Ferentschik <hardy at hibernate.org> said:
> 
> HF> On Jun 28, 2012, at 6:59 AM, Michael Isvy wrote:
> 
> MI> I was discussing this topic with Emmanuel Bernard by email and
> MI> Emmanuel suggested that we move this conversation to this
> MI> mailing-list, so here I am :).
> 
> MI> The idea would be to propose a javascript export of the bean
> MI> validation rules.
> 
> HF> What exactly do you want to export? An JavaScript implementation of
> HF> the default constraints? Do you have already some concrete ideas?
> 
> When I saw this idea right here, moments ago, my first thought was to
> specify a JSON format for validation rules and require the existence of
> some tool that you could point at a bunch of java code that happens to
> have JSR-303 annotations on it and the tool would generate that JSON.
> The JSON format would be designed such that the fidelity of the rules
> would be mostly maintained such that a corresponding piece of code on
> the client side could slurp it down and carry out the rules.

I am not sure I am following you. JSON is really just a transport protocol for some data, right?
Where is the actual validation logic? Or is this what you want to generate via the tool?

The best thing right now would be some prototype or pseudo code/workflow.

--Hardy




More information about the beanvalidation-dev mailing list