Chapter 18. Validate Data with Spry

Add a Validation Text Field

Data being submitted from a form should always be validated. Validation ensures that the user entered the data as you expected: that they provided data for any fields that must contain data and that the data they entered is appropriate. You can validate your forms either at the browser through JavaScript — in which case the validation occurs before the data is actually sent to the server — or on the server after submission. Both techniques have advantages and disadvantages, and so many developers prefer to err on the side of caution and validate both locally and server side.

In the past, creating local validation required a thorough knowledge of JavaScript. Using the Spry framework, ...

Get Master Visually®: Dreamweaver® CS4 and Flash® CS4 Professional 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.