@Paul: There is a need for server side validation. One: if user has Javascript turned off, then server side is all you. Two: people may try to submit malicious data, sending their own POST requests, which would skip the client side validation. Server side validation is your last defense.
On Tue, Oct 12, 2010 at 12:42 PM, Paul Saukas <[email protected]> wrote: > Cheap one: I do not have an answer I am to lazy to search and just write my > own :D > > > Harder one: I see no need in the end. Client side is all you should need. > If you are validating it correctly there then the data going in to the > server should be good and not produce an error. If it does then I suppose > you would handle it in the request then pass off if needed to the validator. > Of Course I am hell and gone from Mootools guru so this may be totally > insane :D > > On Tue, Oct 12, 2010 at 3: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. > > >
