Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Form input validation

Posted on 2003-12-08
5
Medium Priority
?
200 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 80 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 80 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 80 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

721 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