Chapter 8: Orchestrating Validation Experiences in Forms

Web applications use forms when it comes to collecting data from the user. Use cases vary from allowing a user to log in, filling in payment information, booking a flight, or even performing a search. Form data can later be persisted on local storage or be sent to a server using a backend API. A form usually has the following characteristics that enhance the user experience of a web app:

  • Can define different kinds of input fields
  • Can set up different kinds of validations and display validation errors to the user
  • Can support different strategies for handling data in case the form is in an error state

The Angular framework provides two approaches to handle forms: template-driven and

Get Learning Angular - Third Edition 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.