@modular-forms/react
Version:
The modular and type-safe form library for React
13 lines (12 loc) • 388 B
TypeScript
import type { MaybeValue } from '../types';
type Value = MaybeValue<File | File[]>;
/**
* Creates a validation functions that validates the file type.
*
* @param requirement The MIME types.
* @param error The error message.
*
* @returns A validation function.
*/
export declare function mimeType(requirement: string | string[], error: string): (value: Value) => string;
export {};