client side validation doubts

前端 未结 5 1492
情话喂你
情话喂你 2020-12-21 05:53

I have read from one of the blog, for security reasons, its suggested to do the input data validation at the server side not the client side.

From the above stateme

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-21 06:50

    I think the main point is that you should be paranoid on the server side, not assuming that data passed to you has been correctly validated by the client. The client may be an older version which does not properly validate something, or validation may be disabled - or the request may be even coming from a cracker, attempting to break the system.

    Of course, part (or all) of the validation can be performed on the client side too, to avoid useless network traffic and cut down latency.

提交回复
热议问题