[Angular] Create a custom validator for template driven forms in Angular

User input validation is a core part of creating proper HTML forms. Form validators not only help you to get better quality data but they also guide the user through your form. Angular comes with a series of built-in validators such as required or maxLength etc. But very soon you have to build your own custom validators to handle more complex scenarios.
In this lesson you're going to learn how to create such custom validators for Angular's template driven forms.

原文地址:https://www.cnblogs.com/Answer1215/p/7707478.html