import { Validator, ValidatorOptions } from './Validator'; import { I18nMessage } from '../i18n'; interface FileNoHash { size: number; path: string; name: string; /** * mime type like: image/jpeg */ type: string; mtime: Date; } interface FileWithHash extends FileNoHash { hash: string; } interface FileOptions extends ValidatorOptions { hash?: 'md5' | 'sha1'; multiples?: boolean; maxSize?: number; mimeTypes?: string[]; } export declare class FileValidator extends Validator> { optional(): FileValidator; hash(crypto: 'md5' | 'sha1'): FileValidator ? FileWithHash[] : FileWithHash, T>; multiples(): FileValidator; maxSize(byte: number): this; allowMimeTypes(types: string[]): this; protected validateValue(i18n: I18nMessage, obj: Record, key: string, superKeys: string[]): string | void; } export {};