使用了html5 required,后台还需要做 不为空的验证吗
高洛峰
高洛峰 2017-04-17 11:50:36
0
21
3506

因为以前是用js做验证,但是别人禁掉js那么不为空的验证就没效了,所以后台也要加不为空的验证

但现在大部分都使用了html5 required了

那么后台还需要做不为空的验证吗?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(21)
阿神

Users can simulate browser operations and submit illegal data, which can be easily achieved with curl~

黄舟

伊谢尔伦

There is something called Firebug.

Ty80

Must be verified before and after. For a user who understands the front-end, he can maliciously attack your website.

迷茫

The backend still needs to be verified, and the front-end data is never trustworthy

Ty80

What if I simulate a request?

So I have to add it!

大家讲道理

It’s definitely necessary, so I’ll add one more point.
Some mobile versions of WeChat’s built-in browser cannot be used required

伊谢尔伦

Of course you have to add
your review element and then remove required and try

洪涛

Front-end verification is just for experience, the back-end is the real verification

黄舟

Front-end verification is mainly for good user experience and fast response, but it is unreliable and can be bypassed; but background verification is the real verification of data legitimacy, so any front-end verification cannot Replaces background verification.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template