UNPKG

sd-formik-validators

Version:
33 lines (32 loc) 1.78 kB
declare const composeValidators: (...validators: any[]) => (value: string | undefined) => string | undefined; declare const dateValidator: (value: "" | Date | null) => string | undefined; interface IMinimumDateOptions { minDate: Date; customMessage?: string | undefined; } declare const minDateValidator: (minDateOptions: IMinimumDateOptions) => (value: "" | Date | null) => string | undefined; interface IMaxDateOptions { maxDate: Date; customMessage?: string | undefined; } declare const maxDateValidator: (maxDateOptions: IMaxDateOptions) => (value: "" | Date | null) => string | undefined; declare const emailValidator: (value: string) => string | undefined; declare const honeypotValidator: (value: string) => " " | undefined; interface IMinimumOptions { minLength: number; customMessage?: string | undefined; } declare const minLengthValidator: (minOptions: IMinimumOptions) => (value: string) => string | undefined; declare const notPastDateValidator: (value: "" | Date | null) => string | undefined; interface IRegexOptions { message: string; regex: RegExp; } declare const regexValidator: (regexOptions: IRegexOptions) => (value: string) => string | undefined; declare const requiredValidator: (value: string) => string | undefined; declare const stringDateValidator: ({ message, inputMaskToIgnore, }: { message: string; inputMaskToIgnore: string; }) => (value: string | undefined) => string | undefined; declare const zipValidator: (value: string) => string | undefined; export { composeValidators, dateValidator, emailValidator, honeypotValidator, maxDateValidator, minDateValidator, minLengthValidator, notPastDateValidator, regexValidator, requiredValidator, stringDateValidator, zipValidator, };