I used jQuery form validation to make sure the data entered by the user are of correct format. However, the user may disable his/her browser's javascript and enters garbage data. How can I solve this problem?
Asked
Active
Viewed 121 times
0
-
Always validate on the server too. – James Allardice Apr 29 '13 at 07:21
-
Still people disable javascript in browser? – arjuncc Apr 29 '13 at 07:22
-
Use server side validation. – John Apr 29 '13 at 07:22
-
@arjuncc, I guess they just want to hack into the system. – Randy Tang Apr 29 '13 at 11:40
2 Answers
5
It is always a good practise to do serverside
validation also.Don't depend on client too much.
You SHOULD NOT assume the validation successfully done at client side is 100% perfect. No matter even if it serves less than 50 users. You never know which of your user/emplyee turn into an "evil" and do some harmful activity knowing you dont have proper validations in place.
I recommend you to go through:JavaScript: client-side vs. server-side validation

Community
- 1
- 1

Suresh Atta
- 120,458
- 37
- 198
- 307
0
If you want to force the user to use JavaScript, you can use
<body>
<noscript>
Javascript is disabled.
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourweb.com/message_page">
</noscript>
</body>
HTML 5 have some validation features, but most of the modern browser doesn't fully support it.

6339
- 475
- 3
- 16