As for validation using Javascript, there is a HTML specification for this,
and it would probably be wise to implement this as close as possible:
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#constraints


On Thu, Mar 10, 2011 at 2:22 PM, Lukas Kahwe Smith <[email protected]>wrote:

> Aloha,
>
> Thomas asked me about form handling in the ViewBundle, bit largely this is
> a more general question.
>
> 1) rendering the form
> My vision which I briefly discussed with Bernhard back when he was in
> Zurich is that when rendering a form in a non HTML format, we would return
> something to describe the API that the form is essentially exposing. For
> SOAP this would be WSDL, not sure if there is something similar for JSON
> based API's. It would include both the supported "field" and associated
> validation rules.
>
> ViewBundle specific comment:
> The Serializer component supports Normalizers which could be used here to
> serialize the form instance into the above format.
>
> 2) error handling
> Then when the for is submitted. Its validated as usually, but on validation
> error it would just return the errors.
>
> 3) processing
> When the form is valid it would execute the normal logic. Now instead of
> redirecting one would likely want to either just return "OK" or immediately
> "forward" instead of doing a redirect.
>
> ViewBundle specific comment:
> In the ViewBundle its possible to redirect to an url or to a route. In the
> later case we could add an option that determines for which formats to
> actually redirect, for which to just return "OK" and for which to instead
> forward.
>
> regards,
> Lukas Kahwe Smith
> [email protected]
>
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to