UNPKG

558 BTypeScriptView Raw
1import { FileValidator } from './file-validator.interface';
2import { IFile } from './interfaces';
3export type MaxFileSizeValidatorOptions = {
4 maxSize: number;
5 message?: string | ((maxSize: number) => string);
6};
7/**
8 * Defines the built-in MaxSize File Validator
9 *
10 * @see [File Validators](https://docs.nestjs.com/techniques/file-upload#file-validation)
11 *
12 * @publicApi
13 */
14export declare class MaxFileSizeValidator extends FileValidator<MaxFileSizeValidatorOptions, IFile> {
15 buildErrorMessage(): string;
16 isValid(file?: IFile): boolean;
17}
18
\No newline at end of file