Skip to content

Commit f6f1bdf

Browse files
docs: update error message for no metadata warning
1 parent e252183 commit f6f1bdf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/validation/ValidationExecutor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ export class ValidationExecutor {
4545
*/
4646
if (!this.metadataStorage.hasValidationMetaData && this.validatorOptions?.enableDebugMessages === true) {
4747
console.warn(
48-
`No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies.`
48+
`No validation metadata found. No validation will be performed. There are multiple possible reasons:\n` +
49+
` - There may be multiple class-validator versions installed. You will need to flatten your dependencies to fix the issue.\n` +
50+
` - This validation runs before any file with validation decorator was parsed by NodeJS.`
4951
);
5052
}
5153

0 commit comments

Comments
 (0)