Should validation (did the user enter a real date) occur server-side or client-side? Why?

Showing Answers 1 - 12 of 12 Answers

Binda Joshi

  • Mar 10th, 2005
 

This validation should coccur at the client side, cause its easy to validate in the client side rather than shooting it all the way to the server, which increase procesign time, and all unneccssary delays.

sreenivaas

  • Jun 18th, 2005
 

validation will be done in both sides i.e., at the server side and client side. Server side validation will be done even though client side validation performed on the code because of proper security reasons.

  Was this answer useful?  Yes

Bindu

  • Jul 19th, 2005
 

Validations are suggested to be done at every end. Client side, Server side and also at Database end by using constraints, triggers etc., 
Out of client side and server side, it is always suggested to do the maximum validations at client side as the network traffic would be less. Certain times server side validations are also unavoidable though.

  Was this answer useful?  Yes

Jitendra Kumar Thakur

  • Aug 13th, 2005
 

It should be done at Clientside, Serverside. Clientside will reduce roundtrip to server and Serverside is useful for some security reasons. Suppose a user downloaded your web page on his hardisk and after removing your client side validation code trying to access your site. Page.IsValid is there for rescue but there is some trick to bypass. In such cases unwanted users can access your site and to avoid such hacking one must do Server and Clientside validation.

Tahmeem

  • Sep 28th, 2006
 

As always said and some said it is good at client sid as it takes no time,but at the sam etime server side validation is also important,Take an example where you are entering a date greater than todays date ,but this may not be suitable at some cases,like i got a form where i got surgery details and am not supposed to enter a date grater than todays date and if it is a server side you can have th present date that is the system date of th server,but if only client side validation is done then the user can change the daate and can procedd with the form

Eldad Finkelstein

  • Jan 13th, 2007
 

Another reason to consider server validation is a synchronization issue.

Say I want to book a ticket tomorrow for the cinema. Even if the application brings all necessary information for validation, meaning both the date format and all available dates and seats, there's still a chance that another user is requesting the same things I'm requesting, thus causing a clash.

  Was this answer useful?  Yes

levteck

  • Aug 14th, 2010
 

Client side for speed,
Server side for security, to prevent SQL injection use parameterized queries.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions