We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32ddc82 commit 9c29aceCopy full SHA for 9c29ace
packages/common/pipes/file/file-type.validator.ts
@@ -25,19 +25,6 @@ export class FileTypeValidator extends FileValidator<
25
FileTypeValidatorOptions,
26
IFile
27
> {
28
- constructor(validationOptions: FileTypeValidatorOptions) {
29
- super(validationOptions);
30
-
31
- // check if file-type is installed
32
- try {
33
- require.resolve('file-type');
34
- } catch (e) {
35
- throw new Error(
36
- `FileTypeValidator requires the file-type package. Please install it: npm i file-type`,
37
- );
38
- }
39
40
41
buildErrorMessage(file?: IFile): string {
42
if (file?.mimetype) {
43
return `Validation failed (current file type is ${file.mimetype}, expected type is ${this.validationOptions.fileType})`;
0 commit comments