why validate client side and server side

Hi,

I'm just wondering...

I;ve heard it said in videos etc that you should validate input client side and server side.

Why do we need to validate twice?
scm0smlAsked:
Who is Participating?
 
Dale BurrellConnect With a Mentor DirectorCommented:
You validate on the server side because that is the only validation you can guarantee (if javascript is turned off client side validation won't run). And you validate client side (where you can) because its faster and provides a better user experience.
0
 
scm0smlAuthor Commented:
Makes sense....
0
 
Dave BaldwinFixer of ProblemsCommented:
Javascript validation helps get forms filled out correctly by alerting the users to problems.  However, spammers will collect your form info and then bypass your form and submit directly to your 'action' page with curl or other programs.  You have to have server side validation to keep them out.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.