UNPKG

validx

Version:
17 lines (16 loc) 400 B
import { IRule, IValidator } from '../validation'; export declare type Pattern = 'email' | 'url' | RegExp; /** * Rule specifics. * * @export * @interface IPatternRule * @extends {IRule<any>} */ export interface IPatternRule extends IRule { pattern: Pattern; } /** * The validator function. */ export declare const pattern: (rule: IPatternRule | Pattern, msg?: string) => IValidator<any>;