UNPKG

ng2-validators

Version:

An implementation of angular validators for Angular 2

26 lines (25 loc) 860 B
import { AbstractControl, ValidatorFn } from '@angular/forms'; export declare class UniversalValidators { static noWhitespace(control: AbstractControl): { [key: string]: boolean; }; static noEmptyString(control: AbstractControl): { [key: string]: boolean; }; static isNumber(control: AbstractControl): { [key: string]: boolean; }; static isInRange(minValue: number, maxValue: number): ValidatorFn; static minLength(minLength: number): (control: AbstractControl) => { [key: string]: any; }; static maxLength(maxLength: number): (control: AbstractControl) => { [key: string]: any; }; static min(min: number): (control: AbstractControl) => { [key: string]: any; }; static max(max: number): (control: AbstractControl) => { [key: string]: any; }; }