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

Showing Answers 1 - 29 of 29 Answers

Jatinder Singh Rana

  • Aug 8th, 2005
 

if we are using .net validation controls then validation is always done at server on client browser it depends  
1. on type of browser if browser version is less then 4.0 then it is not done  
2. if client have switched off javascript execution on it's browser on it's own through property /settings 
3. in coadding page attribute ClientTarget=Downlevel is defined then also validation is done only on the server

  Was this answer useful?  Yes

Hemapriya

  • Aug 20th, 2005
 

validation should be done in client side itself to avoid the round trip to the server

sandhya

  • Sep 23rd, 2005
 

Its not that validation has to be done only on the client side, depending on the situation it varies, if it is not required to fetch data from the database and validate, client side validation can be done.

 server side validation is done whenever  it is required since it utilizes the server side resources

  Was this answer useful?  Yes

Sudhakar Leo

  • Oct 7th, 2005
 

It Depends on your project if you want to do simple calculations than go ofor client side validations like javascript and if the data you are validating is confident and precious than go for server side validating

  Was this answer useful?  Yes

Prakash Nayak

  • Feb 23rd, 2006
 

Validation should always occur at server side only as the data which is null values cannot be checked properly through client side.

  Was this answer useful?  Yes

mukesh

  • Apr 16th, 2007
 

It is a good practice to validate all the fields (i.e. information) at client side to make less server roundtrip.

  Was this answer useful?  Yes

hiteshc

  • May 26th, 2008
 

Well, it acn be done from both sides(AServer as well as Client). From Server side, you can use Regular Validation Expression for date in different formats, where same thing can be done from Client side by using javascript(JS). So both of them can be use

  Was this answer useful?  Yes

ynvpavan

  • Jul 7th, 2008
 

If you use the asp.net validation controls then the validation is performed both on the client side as well as server side.

So, to have a better performance, it's best to maintain ponly client side validation to check the date validation. And it's better to use client side script, i.e javascript. So that the validation can be performed only on client side and can avoid to have validation controls so that they have a validation check on server side also .

  Was this answer useful?  Yes

It's upon you what you prefer, that can be done on both sides best practice says it should be done on both side just to be on the safer side, becuse there is some possibility that client side validation can be hacked(disabled) by some vulnerable scripts,
so to be on safer side do it on server side as well as client side.

  Was this answer useful?  Yes

albu77

  • Jun 1st, 2009
 

I would say that validation has two aspect:
User interface
Application validation (business rules)and security

To get a smooth, not flickering page and "fast answer" validation: client side
That is the comfort side.

To really validate for the application(business rules and security): server side.
That is the business side;

The second one could not been avoided and hopefully can't be inhibited by the user (in the case n°1 if javascript is killed, no validation)

  Was this answer useful?  Yes

kanika.84

  • Jun 23rd, 2009
 

Ideally validation should be done on client side , so as to save the server resources. But , The server side validation occurs irrespective of the client side validation. Client side validation is done on the client side by using javascript(EMCA script). We can turn off client side validation for a particular control by setting the EnableClientValidation = false in property window of the control.

  Was this answer useful?  Yes

mrp100461

  • Aug 6th, 2009
 

Client side validation should be done to save around trip to the server. There is no data to refresh so a trip to the server is needless 

  Was this answer useful?  Yes

KukkuDipu

  • Aug 17th, 2009
 

Validation can be done both client side and server side.
The advantage of using client side validation is better performance than server side validation as there is no round trip in client side validation.
The disadvantage of client side validation is all browser will not support javascript and for secured data it is recommended to use server side validation

  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