@vtaits/form-schema
Version:
Serialization and parsing form values by schema
27 lines (23 loc) • 603 B
TypeScript
import { o as FieldType } from './types-DafXrhi5.js';
import { B as BaseFieldSchema } from './types-BSr5Y0bw.js';
type FileFieldValue = {
file: Blob | null | undefined;
name?: string;
hasPreviousFile: boolean;
};
type FileSchema<FormApi> = BaseFieldSchema<FormApi, FileFieldValue> & {
/**
* input accept attribute
*/
accept?: string;
/**
* max size in bytes
*/
maxSize?: number;
/**
* min size in bytes
*/
minSize?: number;
};
declare const file: FieldType<FileSchema<unknown>>;
export { type FileFieldValue, type FileSchema, file };