Skip to content

Conversation

@deankarn
Copy link
Contributor

Fixes Or Enhances # .

Added map key validation support with new keys and endkeys eg.

type Test struct {
  Map map[string]string `validate:"dive,keys,trim,endkeys,trim"`
}

keys must be directly after the dive tag; this was done for efficiency to allow map keys and values to be be handled within the same range.

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/admins

@deankarn deankarn self-assigned this Nov 13, 2017
@deankarn deankarn merged commit 61caf9d into v9 Nov 13, 2017
@deankarn deankarn deleted the validate-keys branch November 13, 2017 06:31
fairyhunter13 added a commit to fairyhunter13/validator that referenced this pull request Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants