Skip to content

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

Closed

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

Activity

  1. 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[/+] on Oct 2, 2019
  2. vlapo commented on Oct 2, 2019

    @vlapo
    Contributor

    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.

  3. added
    type: fix
    on Oct 2, 2019
  4. added this to the 0.10.2 milestone on Oct 2, 2019
  5. added a commit that references this issue on Oct 14, 2019
    a055bba
  6. lock commented on Oct 21, 2019

    @lock

    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.

  7. locked as resolved and limited conversation to collaborators on Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: fix

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions