Solved

Form input validation

Posted on 2003-12-08
5
196 Views
Last Modified: 2010-04-06
A general question I would like to ask is that when we create web-based applications what sort of validations do you think is better?

What I mean is that should the validation be checked on the client side (using JavaScript?) or on the server side.
One of my colleagues argued that validating on the client side is better than on server side, because you don?t want to overload the server. However I said that you cannot rely on the client as you in some cases might not know your audience and your validation may fail, also JavaScript sometimes causes a lot of problems.

So I would like your comments on whether to validate inputs on the client side or server side.

ps. sites like EE, Yahoo, Hotmail they all do validations on the server side (plus point I think :))
0
Comment
Question by:glottis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 20 total points
ID: 9902488
If you need data intergrety then the server is the only option. Anything done client side can be overridden by the user.

So use server side first, then consider saving bandwidth for you and the visitor by putting client side in as a secondary layer.
0
 
LVL 2

Author Comment

by:glottis
ID: 9902511
will wait for some more comments
0
 
LVL 8

Assisted Solution

by:nishikanth
nishikanth earned 20 total points
ID: 9902520
its better to the the validation on server side since the client side may feel if they have the disabled them.


http://www.asptechniques.com/content.asp?a=co&cID=949
0
 
LVL 2

Assisted Solution

by:kmalhotra
kmalhotra earned 20 total points
ID: 9904776
We usually find that a combination of client side and server side validations are the best. Somethings are checked on the client side and some on the server and some on both. The logic is that a client can disable the client scripting and bypass the validations so check them on the server.

But if the client-side scripting does work, then we know that we will save a round-trip.

Thanks
KM
0
 
LVL 2

Author Comment

by:glottis
ID: 9910532
thanks for the answer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Google adds suggestions 3 72
wordpress limitations 4 135
What does GoogleTagMgr javascripts below do 5 53
Problem to copy file 14 46
Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question