How to make angular custom validator reusable

preview_player
Показать описание
In this video we will discuss how to make a custom validator reusable in Angular.

Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.

Text version of the video

Slides

Angular 6 Tutorial

Angular 6 Tutorial Text Articles & Slides

Angular, JavaScript, jQuery, Dot Net & SQL Playlists

All the buil-in validator functions are marked as static functions in the Validators class. This allows us to use the validator functions, without the need to create an instance of the Validators class.

Along the same lines let's make our emailDomain custom validator function reusable by including it as a static function in a separate class.
Рекомендации по теме
Комментарии
Автор

Like your videos, in every video i find something new

SuprunAlexey
Автор

I had to use "import { CustomValidators } from to get the code to work.

josephregallis