fix: @ValidateNested() does not work with @Validate(CustomValidator) #2509
Labels
status: needs triage
Issues which needs to be reproduced to be verified report.
type: fix
Issues describing a broken feature.
Description
When I use
@ValidateNested()
on its own (together withclass-transformer
@Type(() => class)
, works as expected, but when I try to use it with@Validate(CustomValidator)
, it seems to get skipped straight to the custom validator.Expected behavior
When SomeObject is defined without attributes:
it should return a validation error telling me attributes must not be empty, not running the custom validator at all
Actual behavior
The custom validator is run (skipping the @ValidateNested), returning an error
Cannot convert undefined or null to object
The text was updated successfully, but these errors were encountered: