import { Request } from "../http"; import { ValidationEvent } from "./types"; export declare class Validator { protected readonly request: Request; protected rules?: any; /** * Errors list */ protected errorsList: any[]; /** * Constructor */ constructor(request: Request, rules?: any); /** * Set rules */ setRules(rules: any): this; /** * Scan the validation rules */ scan(): Promise; /** * Validate array of object */ protected validateArrayObject(input: string, inputRules: any): Promise; /** * Check if validator fails */ fails(): boolean; /** * Check if validator passes */ passes(): boolean; /** * Get errors list */ errors(): any[]; /** * Trigger validation event */ static trigger(eventName: ValidationEvent, ...args: any[]): any; /** * Listen to the given event name */ static on(eventName: ValidationEvent, callback: (...args: any[]) => void): import("@mongez/events").EventSubscription; } //# sourceMappingURL=validator.d.ts.map