Skip to content
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

add the ability to validate a slice of submaps to validate map #859

Conversation

jacobmikesell
Copy link

Fixes Or Enhances

Enhances Validate map flow to support nested validation of slices of maps. This comes up when parsing in a json blob like

	b := []byte(`
		{
		    "Name": [
		        {
		            "Role":1234
		        }
		    ]
		}
	`)

with rules that look like

rules := map[string]interface{}{"Name": map[string]interface{}{"Role":"Required"}}

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/validator-maintainers

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 75.25% when pulling 9be3c32 on apex-fintech-solutions:Add_slice_of_map_support_to_validate_map into ce34f36 on go-playground:master.

@deankarn
Copy link
Contributor

deankarn commented May 1, 2022

Closing in favour of #917

Both PR's look to achieve the same thing. Please reopen if I am mistaken.

@deankarn deankarn closed this May 1, 2022
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.

None yet

3 participants