/** * @param {Validator|Array} validator * @param {boolean} [addToBeginning=false] to add the binder to the start of the binders, true to insert at the start. */ export function add(validator: Validator | Array, addToBeginning?: boolean): void; /** @param {Validator|Array} validator to remove */ export function remove(validator: Validator | Array): void; /** * Removes all registered validators from the registry. Use this if you want to replace the existing validators. */ export function clear(): void; /** * @param {ValidationElement} control to find validators for * @returns {Array} matching validators */ export function matchingValidators(control: ValidationElement): Array; /** * @param {Array} validationResult all validation results * @param {function(ValidationResult):boolean} predicate to filter by * @returns {Array} input filtered so that only invalid results remain */ export function filterValidationResults(validationResult: Array, predicate: (arg0: import("./validation-result").ValidationResult) => boolean): Array; export type ValidationResult = import("./validation-result").ValidationResult; export type ValidationElement = Element; export type ValidationResults = Array>; export type ValidationControlResult = { control: ValidationElement; controlValidationResults: ValidationResults; visited: boolean; }; export type FormValidationResult = { result: Array; errors: Array; isValid: boolean; }; export type Validator = { /** * css selector associated with this control validator */ controlSelector: string; /** * against a control returning an empty string for valid value and non-empty string for invalid value */ validate: (arg0: ValidationElement, arg1: any, arg2: any) => import("./validation-result").ValidationResult | Promise>; };