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 ability to validate map data #752

Merged
merged 8 commits into from May 6, 2021
Merged

Conversation

zytell3301
Copy link
Contributor

Add ability to validate map data based on map validation rules.
In some frameworks like kataras/iris, they return a map of form values.
So it is hard to validate data that is not in struct form. So we can easily provide the data
itself and validation rules in form of map to have an easier data validation

@go-playground/admins

@coveralls
Copy link

coveralls commented Apr 15, 2021

Coverage Status

Coverage decreased (-0.1%) to 75.97% when pulling 870c998 on zytell3301:master into b926bf0 on go-playground:master.

@deankarn
Copy link
Contributor

Thanks for the PR @zytell3301

My only request would be that it support nested data. This looks great for flat data structures but not sure how you could apply validations for nested data.

Thoughts?

@zytell3301
Copy link
Contributor Author

I think i've found a solution for it. I'll push the changes after I implemented it.

Thanks for your attention @deankarn and apologies for any mistakes in PR or commits.
I'm new to these stuff

@zytell3301
Copy link
Contributor Author

Hi. I just implemented validating nested maps. But cross-field validation and keys validation is missing for now. Please check the updates.

@deankarn deankarn merged commit b95d43b into go-playground:master May 6, 2021
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