-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
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
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
Metadata
Metadata
Assignees
Labels
No labels