UNPKG

container.ts

Version:
16 lines (15 loc) 572 B
import validator from "validator"; import { Field } from "../field"; import { IIsString } from "./is-string"; /** Validate.isAlpha options. */ export interface IIsAlpha extends IIsString { /** Locale used by validator, defaults to en-GB. */ locale?: validator.AlphaLocale; } /** Wrapper for validator isAlpha. */ export declare function isAlpha(value?: string, options?: IIsAlpha): string; export declare class AlphaField extends Field<string> { protected readonly options: IIsAlpha; constructor(options?: IIsAlpha); validate(value: string): string; }