UNPKG

ng-validate-equal

Version:

An Angular directive to validate equality of two template-driven form fields

16 lines (15 loc) 699 B
import { OnDestroy } from '@angular/core'; import { Validator, AbstractControl } from '@angular/forms'; import * as i0 from "@angular/core"; export declare class ValidateEqualDirective implements Validator, OnDestroy { otherControl: string; private valueChangesSub; constructor(otherControl: string); ngOnDestroy(): void; validate(selfControl: AbstractControl): any; private isEqual; private unifyEmptyStrings; private isDefined; static ɵfac: i0.ɵɵFactoryDeclaration<ValidateEqualDirective, [{ attribute: "ngValidateEqual"; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<ValidateEqualDirective, "[ngValidateEqual]", never, {}, {}, never>; }