validate: fix printing for non-string values
This commit is contained in:
parent
0e70d4f01f
commit
54a64454b9
@ -76,7 +76,7 @@ func checkValidity(cfg node, report *Report) {
|
||||
|
||||
func checkNodeValidity(n, g node, r *Report) {
|
||||
if err := config.AssertValid(n.Value, g.field.Tag.Get("valid")); err != nil {
|
||||
r.Error(n.line, fmt.Sprintf("invalid value %v", n.Value))
|
||||
r.Error(n.line, fmt.Sprintf("invalid value %v", n.Value.Interface()))
|
||||
}
|
||||
switch g.Kind() {
|
||||
case reflect.Struct:
|
||||
|
Loading…
Reference in New Issue
Block a user