UNPKG

lex-model-validator

Version:
18 lines (17 loc) 887 B
import { BaseError, Constraints, InputModel, LexModelValidator, ValidatorConstructor, ValidatorInterface } from '..'; export declare abstract class Validator implements ValidatorInterface { protected readonly $master: LexModelValidator; protected readonly $parent?: Validator | undefined; protected readonly $children: Validator[]; constructor($master: LexModelValidator, $parent?: Validator | undefined); readonly name: string; readonly childrenCount: number; use(...validatorConstructors: ValidatorConstructor[]): void; abstract getConstraints(): Constraints; run(data: InputModel): void; runChildren(data: InputModel): void; pushError(error: string | BaseError): void; validate(data: InputModel, constraints: Constraints, prefix?: string): void; private getSortedConstraintProperties; private callValidation; }