Validating a Form's Data Using the Validate Form Behavior

Before you receive and process information from a form, make sure the information is complete and in the right format. Dreamweaver has a Validate Form behavior that will force the user to enter data into a field, determine whether or not an e-mail address has been entered, and make sure the user enters numbers correctly.

The Validate Form action requires the user to enter the form data correctly before they can submit the data to a script or an application on the server. You can validate the form in two ways:

  • Attach the Validate Form action to the Submit button to validate the entire form when the Submit button is clicked. The onClick event triggers the behavior.

  • Attach the Validate Form ...

Get Sams Teach Yourself Macromedia® Dreamweaver® MX in 24 Hours 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.