svelidate
Version:
Simple and lightweight form validation for Svelte with no dependencies
106 lines (105 loc) • 7.37 kB
TypeScript
import type { ValidatorGetterParam } from '../types/svelidate/validators';
import type { ByteUnit, FileExtension } from "../types/misc";
declare const filelist: {
required: (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
files: {
type: {
image: (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
raster: (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
vector: (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
video: (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
audio: (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
is: (allowedExtensions: FileExtension[] | ValidatorGetterParam) => (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
};
size: {
gt(size: number | ValidatorGetterParam, unit?: ByteUnit): (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
gte(size: number | ValidatorGetterParam, unit?: ByteUnit): (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
lt(size: number | ValidatorGetterParam, unit?: ByteUnit): (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
lte(size: number | ValidatorGetterParam, unit?: ByteUnit): (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, unit?: ByteUnit): (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, unit?: ByteUnit): (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
neq(size: number | ValidatorGetterParam, unit?: ByteUnit): (error?: string) => Readonly<{
js: import('../types/svelidate/validators').JsValidator<unknown>;
html: import('../types/svelidate/validators').HtmlValidatorMapper<import("../types/html").SvelidateInputType>;
}>;
eq(size: number | ValidatorGetterParam, unit?: ByteUnit): (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 filelist;