Skip to content

Map validation like in the examples doesn't seem to work #428

Closed
@larsbs

Description

@larsbs

Doing exactly like in the provided example for Map validation doesn't work.

My code:

class EventDto {
  @IsInt({ each: true })
  readonly clicks: Map<string, number>;
}

The above code won't trigger any errors when receiving: { myKey: 'a string' }

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: fixIssues describing a broken feature.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions