UNPKG

validx

Version:
15 lines (14 loc) 371 B
import { IValidator, IRule } from '../validation'; /** * Rule options. */ export interface IFuncRule extends IRule { fn: IValidator<any>; } /** * Simple way to run a function and return an error message. * * @param rule * @returns {(opts:any)=>boolean|string} */ export declare const func: (rule: IFuncRule | IValidator<any>, msg?: string) => IValidator<any>;