[removed] client-side vs. server-side validation

后端 未结 13 751
余生分开走
余生分开走 2020-11-21 11:58

Which is better to do client side or server side validation?

In our situation we are using

  • jQuery and MVC.
  • JSON data to pass between our Vi
13条回答
  •  日久生厌
    2020-11-21 12:24

    Client side data validation can be useful for a better user experience: for example, I a user who types wrongly his email address, should not wait til his request is processed by a remote server to learn about the typo he did.

    Nevertheless, as an attacker can bypass client side validation (and may even not use the browser at all), server side validation is required, and must be the real gate to protect your backend from nefarious users.

提交回复
热议问题