import { Request } from "../../http"; export declare abstract class Rule { /** * Rule name */ static ruleName: string; /** * Determine if the rule requires a value to be present */ requiresValue: boolean; /** * Determine if rule is valid */ protected isValid: boolean; /** * Input name */ protected input: string; /** * Input value */ protected value: any; /** * Current request */ protected request: Request; /** * Rule options * This can be passed using the following syntax: * rule:option1,option2,option3 */ protected options: any[]; /** * Error message */ protected errorMessage: string; /** * Set rule options */ setOptions(options: any[]): this; /** * Set request */ setRequest(request: Request): this; /** * Validate the rule */ abstract validate(): Promise; /** * Set input name */ setInput(input: string): this; /** * Set input value */ setValue(value: any): this; /** * Determine if rule validation passes */ passes(): boolean; /** * Determine if rule validation fails */ fails(): boolean; /** * Error message * This will override the default error message */ setErrorMessage(message: string): this; /** * Translate the given key and its attributes */ trans(key: string, attributes?: any): any; error(): string; } //# sourceMappingURL=rule.d.ts.map