Рет қаралды 36,035
We have learned how to validate a form control using angular's built-in validators. But it is also possible to create our own custom validators. Also remember that, every validator returns a validation error code whenever that validation fails on a form control.
In this lecture, i will show you how to create your own custom validators and how to use it. You will also learn how to return a validation error code from your custom validator. You are going to learn:
1. What is validation error code?
2. How to create custom validators?
3. How to use custom validators on a form control?
Let's learn about custom validators with a simple example.