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
The following struct:
type S struct { Props map[string]interface{} `valid:"required"` } d := S{props: map[string]interface{}{"field": "test"} result, err := valid.ValidateStruct(d) ...
With the above code, it gets an error: "function only accepts structs; got string;"
However, if the field of Props is private (i.e., props), the validation is skipped.
The validator does not handle required field of map[string]interface{} correctly.
The current result: false with the error msg of "function only accepts structs; got string;"
See the above sample code.
The expected validation result: true (no error)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
The following struct:
With the above code, it gets an error: "function only accepts structs; got string;"
However, if the field of Props is private (i.e., props), the validation is skipped.
Summary
The validator does not handle required field of map[string]interface{} correctly.
Current behavior
The current result: false with the error msg of "function only accepts structs; got string;"
How to reproduce
See the above sample code.
Expected behavior
The expected validation result: true (no error)
The text was updated successfully, but these errors were encountered: