What are the best practice for input validation? via /r/learnprogramming


What are the best practice for input validation?

Another subreddit I'm subscribed to had a debate in the comments regarding this. Unfortunately it wasn't very productive, so the question is still lingering in my head. In a web application, what layer(s) should input validation occur? The arguement mentioned before, some people said validation should be entirely done on server side, while some argued that this was a waste of computational power and basic validation should be done on the client, then layered on until you reach the database.

I agree more with the latter approach, it seems redundant to verify input lengths and non-null if the client already verifies that. But I know there is something I'm overlooking, so please help me out here!

Submitted July 09, 2017 at 11:03AM by NowImAllSet
via reddit http://ift.tt/2tZTrEf

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s