[thelist] Client-side or Server-side Form Validation?

Phil Turmel philip at turmel.org
Tue Oct 12 16:57:05 CDT 2004


Rob Smith wrote:
> Hi list,
> 
> Which do you prefer? Client-side or Server-side form validation? All
> languages/platforms are up for grabs here. This is general web development
> preference.
> 
> Rob Smith

Rob,

Server side is a minimum, client side is a very desireable plus.

Client side scripting is vulnerable to numerous browser and 
version conflicts, some of which seem impossible to solve. 
Plus, the user can disable it.  So the server must enforce 
both security and business logic, regardless what might or 
might not be happening on the client.

Don't skip the client side, though. A little bit of client 
side scripting can go a long way when it comes to usability. 
  I always implement modified field highlighting and numeric 
entry formatting. The user can quickly identify which fields 
have been touched, and numeric fat-finger errors are 
immediately obvious.

If particular data entry errors are common in an 
application, I'll check for them on the client side and 
disable the submit button.  One less server exchange to 
handle, and quicker feedback to the user.

My 2c.

Phil Turmel


More information about the thelist mailing list