Re: [dfv] Data::Formvalidator and JQuery validation
Status: Inactive
Brought to you by:
markjugg
|
From: Lyle <web...@co...> - 2010-03-19 00:35:47
|
Ron Savage wrote: > Hi Lyle > > On Thu, 2010-03-18 at 15:59 +0000, Lyle wrote: > >> Ideally I don't want to JS validation to result in a server request. I >> want it all client side so that the server only get's a request if it's >> all valid or JS is turned off. >> > > This doesn't make any sense. You /always/ need server-side validation. > ??? Obviously. > For instance, a hacker can download your page, delete the Javascript > validation, and submit any data whatsoever. > > The client-side validation is purely to give the user quick feedback. > No, client side is to produce less calls the server. User input -> to server -> invalid -> update input -> to server -> invalid -> etc... -> to server -> valid. This can be a lot of needless server calls. With good JS validation all or most of those invalid input server calls can be avoided. Obviously the server needs to do validation when the input comes in, that goes without saying. But these days JS is pretty good, the more you can get the client side doing, then less load on your server. >> Let's do it! :) DFV has a lot of legacy and bloat now. I found it was a >> pretty steep learning curve the first time is used it (although I had a >> LOT of input to validate). I'm sure with all your experience with it you >> have a fairly good idea in your head of how it should be. If a >> 'framework' for it could be thrashed out on this list, I'd be happy to >> work on it with you. After all, it's something I'm working on right now >> for my software. The priorities I see are:- >> > > Data::Verifier has a much simpler interface, but requires Moose. > > Also, it does not offer any Javascript features. > > So, if you wish to invent another wheel, Data::Verifier is the type of > interface to aim for. > Looks interesting, but a Moose dependency seems a bit much when I'm trying to ship the dependency tree. >> Pure Perl option >> Light weight >> Easy to extend >> Easy integration with modern client side JS libraries >> > > Yes, that'd be nice. > I won't settle for anything less. TBH I'm quite shocked it's not already out there... Lyle |