开发者

About the validation in web application development [duplicate]

开发者 https://www.devze.com 2023-02-02 06:56 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: Why is client-side validation not enough ?
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Why is client-side validation not enough ?

you have to validate data before store it.

validate in c开发者_运维百科lient side or server side or both?

what's your consideration?


My consideration: both.

  1. client-side - more user-friendly (e.g can respond right after leaving the field, no full-page reload, quicker response since no roundtrip network request, etc)

  2. server-side - because you shouldn't trust the client

The drawback is of course maintaining the rules in both places, especially if they are in different languages/frameworks.

0

精彩评论

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