Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/feat-package-class-…
Browse files Browse the repository at this point in the history
…validator-support' into feat-package-class-validator-support
paulwer committed Nov 8, 2024
2 parents 86bd4f9 + df9128e commit 5d2b8e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ function formatErrors(errors: ValidationError[], parentPath = ''): { path: strin

export class ClassValidatorValidator implements Validator<ClassType> {
canHandle(schema: Schema): schema is ClassType {
return typeof (schema as ClassType) === 'function';
return typeof schema === 'function' && schema.prototype !== undefined && schema.prototype.constructor === schema;
}

async validate<

0 comments on commit 5d2b8e9

Please sign in to comment.