Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
larsbs opened this issue Oct 2, 2019 · 2 comments · Fixed by #430
Closed

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

larsbs opened this issue Oct 2, 2019 · 2 comments · Fixed by #430
Labels
type: fix Issues describing a broken feature.
Milestone

Comments

@larsbs
Copy link

larsbs commented Oct 2, 2019

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' }

@larsbs larsbs changed the title Trying to validate a Map but it doesn't seem to work Map validation like in the examples doesn't seem to work Oct 2, 2019
@vlapo
Copy link
Contributor

vlapo commented Oct 2, 2019

It looks like we accidentally added examples with Map and Set for non-nested validators. This functionality is not implemented, yet. I will correct this mistake and add this functionality in next release. Stay tuned.

@lock
Copy link

lock bot commented Oct 21, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: fix Issues describing a broken feature.
Development

Successfully merging a pull request may close this issue.

2 participants