Chapter 7. Validating Forms

IN THIS CHAPTER

  • Providing Information

  • Validating User Data

  • Validating Credit Card Numbers

A common use of JavaScript is validating forms, which means using JavaScript to make sure that the user supplied the information in the form that you need. We're going to look at this in two sections: making sure the user provided certain bits of information and making sure that the information the user provided is in the appropriate form. There are also some advanced techniques in Chapter 17, “Regular Expressions.”

Get Advanced JavaScript™: Insights and Innovative Techniques 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.