OptionalcontentType?: stringExpected MIME type of the uploaded file (e.g. "image/png").
When set, validation fails if the uploaded file's content type does not match.
OptionalfileSize?: IFileSizeMaximum allowed file size. Validation fails if the uploaded file exceeds this limit.
Optionalmax?: numberMaximum number of files allowed for this field. Validation fails if more files are uploaded.
Optionalmin?: numberMinimum number of files required for this field. Validation fails if fewer files are uploaded.
1 (0 if optional is true)
Optionalname?: string | RegExpExpected filename or a pattern the filename must match.
When a string, the value is compared against the uploaded file's originalName
(case-insensitive). When a RegExp, the filename must satisfy the pattern.
Optionaloptional?: booleanWhen true, the file is optional and validation passes even if no file is uploaded.
Static definition for validating an uploaded file's metadata.
Use this when the validation rules for a file field are known ahead of time and do not depend on the actual uploaded file. You can constrain the MIME type, file size, filename pattern, and whether the file is required or optional.
IMPORT_PATH:
"@daiso-tech/core/http-router/contracts"