Skip to content

Commit 9b9427b

Browse files
committed
fix(const error): error reports what const must equal instead of supplied value
closes #34
1 parent 3313399 commit 9b9427b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

keywords.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (c Const) Validate(propPath string, data interface{}, errs *[]ValError) {
214214
}
215215

216216
if !reflect.DeepEqual(con, data) {
217-
AddError(errs, propPath, data, fmt.Sprintf(`must equal %s`, InvalidValueString(data)))
217+
AddError(errs, propPath, data, fmt.Sprintf(`must equal %s`, InvalidValueString(con)))
218218
}
219219
}
220220

0 commit comments

Comments
 (0)