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.
|Server-side||Very safe, will always work, regardless of the browser used and any browser settings||Not very user-friendly, user must submit form before validation occurs; any errors require resubmission|
|Client-side||More user-friendly, users prefer knowing what is wrong before form submission||Less 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 ...