开发者

Jquery and server form validation

I'd like to know what the best way to handle form validation is where it pertains to server side. I'm really new to JQ and have successfully implemented a JSON submit. Before I had this implemented, I was doing all of my validation on the server end and echoing any error back out to the user. Now I'm looking at the completed form and wondering if coding the server stuff is even necessary. I know that if the user turns off Javascript that I should still have something on the serve开发者_JS百科r side that will do the validation but I'd like to know what the best practice would be for this. Thanks.


Best practice would be to validate all user data server side regardless of client side validation as any one can bypass JavaScript either by disabling it or injecting code onto the page to disable your validation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜