Pros and Cons of Each Option

Neither of these options is perfect, and they are thus often used together, complementing each other. Table 13.1 lists the pros and cons of each option.

Table 13.1. The Pros and Cons of Client and Server Form Validation
Validation TypeProsCons
Server-sideVery safe, will always work, regardless of the browser used and any browser settingsNot very user-friendly, user must submit form before validation occurs; any errors require resubmission
Client-sideMore user-friendly, users prefer knowing what is wrong before form submissionLess safe, not supported by some older browsers; can be disabled, scripting languages have a lengthy learning curve

From a user’s perspective, client-side validation is preferable. Obviously, users ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.