Is server validation necessary with client-side validators?

Posted by peroija on Programmers See other posts from Programmers or by peroija
Published on 2012-10-22T12:18:03Z Indexed on 2012/10/22 23:17 UTC
Read the original article Hit count: 172

Filed under:
|
|
|

I recently created a .net web app that used over 200 custom validators on one page. I wrote code for both ClientValidationFunction and OnServerValidate which results in a ton of repetitive code.

My sql statements are parameterized, I have functions that pull data from input fields and validates them before passing to the sql statements or stored procedures. And the javascript validates the fields before the page submits. So essentially the data is clean and valid before it even hits the OnServerValidate and clean after it anyways due to the aforementioned steps.

This makes me question, is OnServerValidate really needed when I validate on the clientside?

© Programmers or respective owner

Related posts about c#

Related posts about JavaScript