How to add custom validation with two field in Angular

preview_player
Показать описание
Adding custom validation with Angular is much easier. But how do you perform validation which requires two or more fields? In this video, we explore a way to add custom validation in Angular to apply validation using two fields.

*********************************************************************************************

👉Subscribe to this Channel:

#Angular #JavaScript #Validation
Рекомендации по теме
Комментарии
Автор

Thank you so much for this video It help me to do my task

niloybarmon
Автор

Thanks a lot. I tried it all day but failed and you save my day.

zihadurrahmman
Автор

Dear sir, that was the only solution that worked for me that I found on YouTube. Thanks a lot and keep up the great work!

jakubvala
Автор

This helped me alot. Very nice video and great work.

sheena
Автор

It's not working for me and I don't know why. I'm getting errors in the function code: Type '(form: FormGroup) => { [key: string]: boolean; } | null' is not assignable to type 'ValidatorFn'.
Types of parameters 'form' and 'control' are incompatible.
Type 'AbstractControl' is missing the following properties from type 'FormGroup': controls, registerControl, addControl, removeControl, and 3 more.ts(2322)

MZ-uvsr
Автор

Wow, this is the exact scenario I was stuck and this video helped me very much. Mine is also based on Angular Material + Reactive form

gopinathkrm
Автор

could you share it on github link please

dhavaldokhe
Автор

If you compare these 2 dates with today then it will not work as today's getTime is always greater than the current day selected due to time factor.

Can you add logic to check for date validation which must be >= current date?

rexsam
welcome to shbcf.ru