Handling Errors
Explore how to handle and display error messages from custom validators in Angular forms. Learn to apply Bootstrap classes for styling, manage control and form group errors, and provide user-friendly feedback when validation fails, including password mismatch.
We'll cover the following...
We'll cover the following...
The last step before we move onto authentication is to output the errors from the validators. This includes the custom validator we created to verify that the passwords match. Let’s get started.
Form control errors
We’ll start by handling errors for the form controls. This is something we’re already familiar with handling. We’re using Bootstrap for this app, so we’ll be using Bootstrap classes for styling the error output.
First, we’ll apply a class, called is-invalid, to the ...