UNPKG

@e-group/utils

Version:

eGroup team utils that share across projects.

16 lines (15 loc) 657 B
import { MobilePhoneLocale } from 'validator/lib/isMobilePhone'; export declare type ValidatorValue = string | Date | undefined | null; declare class Validator { errors: object; name: string; value: ValidatorValue; constructor(errors: object, name: string, value: ValidatorValue); isRequired(message: string): this; isMobilePhone(message: string, locale: MobilePhoneLocale): this; isEmail(message: string): this; lengthLimit(max: number, message: string): this; isDateBefore(date: Date, message: string): this; } export default function factory(errors: object, name: string, value: ValidatorValue): Validator; export {};