If you reponse back with errors in a json format where the key is the
label/id you could easily add the errors back in the form layout
onSuccess of the ajax post. Though I have not seen a ready made plugin
yet that does this for you :) I would not return html though, json is
easier.

On Oct 12, 9:30 pm, hairbo <[email protected]> wrote:
> Hi all,
>
> I'm considering rolling the cool Form.Validator stuff into my generic
> form code, and I have two questions, one cheap, and one more in-depth:
>
> Cheap one:  I see the default error behavior I get with
> Form.Validator.Inline.  It's nice, but I was wondering if there was a
> catalog out there somewhere of other ways to handle the error
> messages.  For example, I'd really like to have the error message
> appear inside the <label> tag, but I'm trying to be lazy and not write
> my own...<ducks>.
>
> More in-depth one:  So client-side validation is nice, but obviously,
> you still need to validate data on the server, and you still need to
> be able to return errors from the server back to the client if you hit
> errors.  So, from that perspective, the only thing that client-side
> validation really wins you is less of a server load, and maybe a nicer
> experience for the end user.
>
> The slick thing to do would be to somehow integrate error messages
> spit back by the server with error messages from Form.Validator.  I'm
> not 100% sure what the behavior should be like, but in a general way,
> I'd imagine that the server would return <div class="validation-
> advice"> tags that somehow Form.Validator would pick up, and then
> appropriately display (and then appropriately remove, if/when the user
> inputs data in the proper format).  I guess my question is...does this
> kind of integration exist?  How do other folks handle this sort of
> thing?
>
> Thanks.

Reply via email to