-
Notifications
You must be signed in to change notification settings - Fork 827
Open
Labels
flag: needs discussionIssues which needs discussion before implementation.Issues which needs discussion before implementation.type: documentationIssues related to improving the documentation.Issues related to improving the documentation.
Description
Description
In the README.md section about validating arrays containing nested objects, the requirements for validating objects created with class-transformer are not made clear. This issue regards the following section of the documentation:
Lines 332 to 342 in 9f0c3e9
It also works with multi-dimensional array, like : | |
```typescript | |
import { ValidateNested } from 'class-validator'; | |
export class Plan2D { | |
@ValidateNested() | |
matrix: Point[][]; | |
} | |
``` | |
The problem is, that after creating a nested array with class-transformer with the above code as template, the objects within the array do not contain the class information.
Proposed solution
I suggest to include the following additional information:
When validating nested objects created with class-transformer, it is required to specify the type of the nested objects as described in the class-transformer documentation.
Metadata
Metadata
Assignees
Labels
flag: needs discussionIssues which needs discussion before implementation.Issues which needs discussion before implementation.type: documentationIssues related to improving the documentation.Issues related to improving the documentation.