UNPKG

svelidate

Version:

Simple and lightweight form validation for Svelte with no dependencies

75 lines (74 loc) 4.89 kB
import type { ValidatorGetterParam } from '../types/svelidate/validators'; declare const string: { required: (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; email: (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; upperCase: (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; lowerCase: (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; number: (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; symbol: (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; regex(regex: RegExp | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; eq(str: string | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; neq(str: string | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; length: { gt(length: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; gte(length: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; lt(length: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; lte(length: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; inside(min: number | ValidatorGetterParam, max: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; outside(min: number | ValidatorGetterParam, max: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; neq(length: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; eq(length: number | ValidatorGetterParam): (error?: string) => Readonly<{ js: import('../types/svelidate/validators').JsValidator<unknown>; html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>; }>; }; }; export default string;