-
Notifications
You must be signed in to change notification settings - Fork 827
Closed
Labels
priority: highstatus: done/releasedIssue has been completed, no further action is needed.Issue has been completed, no further action is needed.type: fixIssues describing a broken feature.Issues describing a broken feature.
Description
Description
Since the 0.12.x update, the names of the decorators are lost when stored.
For example, when the IsString
decorator is used, the metadata store a new entry with the type customValidation
instead of isString
. This seems to apply to all decorators, because of this line:
class-validator/src/register-decorator.ts
Line 80 in 1955250
type: options.name && ValidationTypes.isValid(options.name) ? options.name : ValidationTypes.CUSTOM_VALIDATION, |
Reproduction
Inspect the stored metadata with getMetadataStorage().getTargetValidationMetadatas
and you'll see that all entries' type
s are customValidation
, instead of their decorator names.
Environment
- nodejs: 10.18.1
- browser: no
- framework/library: standalone
class-validator version: 0.12.2
Clashsoft
Metadata
Metadata
Assignees
Labels
priority: highstatus: done/releasedIssue has been completed, no further action is needed.Issue has been completed, no further action is needed.type: fixIssues describing a broken feature.Issues describing a broken feature.