To what extent should I rely on client-side validation?

I have a long form that heavily uses client-side validation (written in jQuery). To prevent users with JavaScript disabled from submitting the form, I included a hidden field that is populated with javascript_enabled jQuery. If JS is disabled in the browser, then the file remains empty and the form will not be submitted.

The question is, is this enough, and should I feel safe, or do I also need to enable server-side validation for each field?

+3
source share
4 answers

No. Client-side verification is available only for the convenience of the user, and not to protect your server.

.

, .

+8

? . . UX.

.

+6

, .

  • ( ).

  • . ( JavaScript, HTTP, , , CURL)

  • ( )

  • , XSS SQL Injection. ( )

,

WebSocket , . WebSockets () , , , . , !

+4

Verification on the server side is mandatory, verification on the client side should do as much as practically without the overhead of a trip to the server.

0
source

All Articles