You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type input struct {
Name string. `json:"name"`
Description string. `json:"description"`
}
Fill in data
i := &input{
Name: "name",
Description: "description",
}
Validate
schema.Validate(i)
What happened?
The Validate method passed with no errors.
If I serilize the custom struct into a map, then pass that into the Validate method, validation error does appear.
What did you expect to happen?
Should see validation error when validating struct
The text was updated successfully, but these errors were encountered:
Environment
GO 1.16
What is your OS and version?
Mac 11.3.1 (Big Sur)
What version of qri are you using (
qri version
)?0.2.0
What version of Qri Desktop are you using?
N/A
What browser(s) did you use? What version?
N/A
Issue
The Validate method always pass for custom struct
What did you do?
Define a custom struct
Fill in data
Validate
What happened?
The Validate method passed with no errors.
If I serilize the custom struct into a map, then pass that into the Validate method, validation error does appear.
What did you expect to happen?
Should see validation error when validating struct
The text was updated successfully, but these errors were encountered: