Skip to content

Commit

Permalink
docs: update CHANGELOG about fixed schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
NoNameProvided committed Jul 19, 2018
1 parent bef69d5 commit c2acfa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

* added option to pass custom context for the decorators

### Fixes

* validating against a schema will validate against that one instead of every registered one

### 0.9.0 [BREAKING CHANGE]

#### Features
Expand Down
3 changes: 2 additions & 1 deletion src/metadata/MetadataStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export class MetadataStorage {

// get metadatas for inherited classes
const inheritedMetadatas = this.validationMetadatas.filter(metadata => {
if (typeof metadata.target === "string")
// if target is a string it's means we validate agains a schema, and there is no inheritance support for schemas
if (typeof metadata.target === "string")
return false;
if (metadata.target === targetConstructor)
return false;
Expand Down

0 comments on commit c2acfa4

Please sign in to comment.