When you try to make a confirm password or a retype email field using Angular template-driven forms, you might think it will be as easy as using a validate equal attribute that would take the other field's reference or name and produce an error if the two fields aren't matching,

You start searching for this attribute in Angular documentation but you can't find anything, so you turn to stack overflow for answers and you figure out that you have to make it yourself using custom validators, which will cost you some time and effort.
In this short article I will show you how to use an npm package that does exactly what you need in 3 easy steps without any effort.

Step 1:

install ng-validate-equal package
npm i ng-validate-equal

Step 2:

import ValidateEqualModule from 'ng-validate-equal' in your module.ts and add it to the NgModule imports' array
import { ValidateEqualModule } from 'ng-validate-equal';

@NgModule({
  declarations: [],
  imports: [
    ValidateEqualModule
  ],
  providers: [],
})

Step #3: