import { AbstractControl, ValidationErrors, Validator } from '@angular/forms'; import { CompareValidationConfig, ConditionalValidationConfig, CountValidationConfig, DateValidationConfig, LengthValidationConfig, LinkValidationConfig, RangeValidationConfig, RegExpValidationConfig } from '../../interfaces/validation-config.interface'; import * as i0 from "@angular/core"; /** * @publicApi * @description * A Directive that preforms a RegEx check on value in the given * FromControl / AbstractControl * * Has an input in which you specify the regular expression * and optionally you can give it a custom name and a custom * error content / message. * * @usageNotes * */ export declare class RegExpValidatorDirective implements Validator { value: RegExpValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a date comparison between a specified date * and a date in the given input and returns an error if the date in * the given input is later then the specified one. * * Has an input in which you specify the date to compare to * and optionally you can give it a custom name and a custom * error content / message. * * @usageNotes * */ export declare class EarlierThenValidatorDirective implements Validator { value: DateValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a date comparison between a specified date * and a date in the given input and returns an error if the date in * the given input is earlier then the specified one. * * Has an input in which you specify the date to compare to * and optionally you can give it a custom name and a custom * error content / message. * * @usageNotes * */ export declare class LaterThenValidatorDirective implements Validator { value: DateValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a date comparison between a specified date * and a date in the given input and returns an error if chosen comparison * fails. * * Has an input in which you specify the date to compare to, * comparison to preform and optionally you can give it a custom name * and a custom error content / message. * * Available comparisons are: '<' , '>' , '==' , '===' , '<=' , '>='. * * @usageNotes * */ export declare class CompareToValidatorDirective implements Validator { value: CompareValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a conditional check and if the condition * passes it will return an error. * * Has an input in which you specify the condition that is to be checked * and optionally you can give it a custom name and a custom error * content / message. * * @usageNotes * * * NOTE: It is not recommended to pass a function to be executed in the template, * as this function will be executed every change detection cycle. */ export declare class RequiredWhenValidatorDirective implements Validator { value: ConditionalValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a check if the specified FromControl / AbstractControl * has a value and a given input does not. * * Has an input in which you the name of the FromControl / AbstractControl to link * to and optionally you can give it a custom name and a custom error * content / message. * * @usageNotes * */ export declare class LinkToValidatorDirective implements Validator { value: LinkValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a check if the specified FromControl / AbstractControl * does not have a value and a given input does. * * Has an input in which you the name of the FromControl / AbstractControl to link * to and optionally you can give it a custom name and a custom error * content / message. * * @usageNotes * */ export declare class LinkedToValidatorDirective implements Validator { value: LinkValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a check on a specified FromControl / AbstractControl's * value and returns an error if the given comparison fails. * * Has an input in which you specify the length to compere to and the comparison * to preform. Optionally you can give it a custom name and a custom error * content / message. * * @usageNotes * ", * errorName: 'length', * error: 'Value is not long enough.' * }" * /> */ export declare class LengthValidatorDirective implements Validator { value: LengthValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a check on a specified FromControl / AbstractControl's * value and returns an error if the value is not in the specified range. * * Has an input in which you specify the range start value, range end value * and optionally you can give it a custom name and a custom error content / message. * * NOTE: The range is inclusive. * * @usageNotes * */ export declare class RangeValidatorDirective implements Validator { value: RangeValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a check on a specified FromControl / AbstractControl's * value and returns an error if it doesn't have a required word count. * * Has an input in which you specify the word count to compere to and the comparison * to preform. Optionally you can give it a custom name and a custom error * content / message. * * @usageNotes * ", * errorName: 'wordCount', * error: 'The minimum required word count is 8.' * }" * /> */ export declare class WordCountValidatorDirective implements Validator { value: CountValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @publicApi * @description * A Directive that preforms a check on a specified FromControl / AbstractControl's * value and returns an error if the value is not in the specified word count range. * * Has an input in which you specify the range start value, range end value * and optionally you can give it a custom name and a custom error content / message. * * NOTE: The range is inclusive. * * @usageNotes * */ export declare class WordCountRangeValidatorDirective implements Validator { value: RangeValidationConfig; validate(control: AbstractControl): ValidationErrors | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }