We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I have struct like this:
type Contact struct { Type string `json:"type"` Value string `json:"value"` } type User struct { Name string `json:"name"` Contacts []Contact `json:"contacts"` }
How to validate contact Type and value?
The text was updated successfully, but these errors were encountered:
hi @bhill77 did you got the answer for this?
Sorry, something went wrong.
I iterate the slice and validate in the loop. I think this library doesn't support slice validation
Please use custom validation rules. Library supports length, required etc for slice
length, required
slice
https://github.com/thedevsaddam/govalidator/blob/master/doc/CUSTOM_RULE.md
No branches or pull requests
If I have struct like this:
How to validate contact Type and value?
The text was updated successfully, but these errors were encountered: