validate: fix printing for non-string values

This commit is contained in:
Alex Crawford 2014-12-21 11:24:10 -08:00
parent 0e70d4f01f
commit 54a64454b9

View File

@ -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: