import { AbstractControl , Validators , ValidatorFn } from '@angular/forms' ; import { utilsBr , validateBr } from 'js-brasil' ; export const currency = ( control ) : { [ key ] : boolean ; } => { if ( utilsBr . isPresent ( Validators . required ( control ) ) ) { return null ; } const v = control . value ; return validateBr . currency ( v ) ? null : { currency : true } ; } ;