UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

60 lines (59 loc) 1.58 kB
type ValidatorHandler<T> = (host: T) => boolean; type ValidatorMessageFormat<T> = (host: T) => string; export interface Validator<T = any> { key: keyof ValidityStateFlags; message: string | ValidatorMessageFormat<T>; isValid: ValidatorHandler<T>; } export declare const requiredValidator: Validator<{ required: boolean; value?: unknown; }>; export declare const requiredNumberValidator: Validator<{ required: boolean; value?: number | string; }>; export declare const requiredBooleanValidator: Validator<{ required: boolean; checked: boolean; }>; export declare const minLengthValidator: Validator<{ minLength: number; value: string; }>; export declare const maxLengthValidator: Validator<{ maxLength: number; value: string; }>; export declare const patternValidator: Validator<{ pattern: string; value: string; }>; export declare const minValidator: Validator<{ min: number | string; value: number | string; }>; export declare const maxValidator: Validator<{ max: number | string; value: number | string; }>; export declare const stepValidator: Validator<{ min: number | string; step: number | string; value: number | string; }>; export declare const emailValidator: Validator<{ value: string; }>; export declare const urlValidator: Validator<{ value: string; }>; export declare const minDateValidator: Validator<{ value?: Date | null; min?: Date | null; }>; export declare const maxDateValidator: Validator<{ value?: Date | null; max?: Date | null; }>; export {};