Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Usability

Web Design Reference Guide

Hosted by

Forms Validation

Last updated Oct 17, 2003.

By Molly Holzschlag

Forms require validation, and this can be done either on the client side or the server side. Validation of forms mostly involves checking that the information a person has input into the form is accurately formed, and that no required fields have been skipped.

Client-side validation is almost always done using (usually) JavaScript. Using JavaScript for forms validation is an easy-to-implement option, and because the validation is done client-side, it can occur rather quickly, improving user experience. On the other hand, if JavaScript is disabled by the user or for some reason unavailable, this technique won't work.

Server-side validation for forms can be achieved with almost every conceivable server-side application language. You can do it with PHP, ASP, .NET, ColdFusion, Perl/CGI, Python/Zope; if you can name an application language used on the Web, it'll have form validation built-in.

So how do you choose? If you want a simple and fast method, I recommend using client-side with JavaScript. If you want a stable, interoperable method, choose an application that will work with your server. Some Web developers advocate using both a client-side option along with a server-side option. If the client doesn't support JavaScript, the server validation steps up to the plate and handles the validation in its stead.