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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.