Skip to content

Commit 684c339

Browse files
Dean KarnDean Karn
authored andcommitted
issue-#15
correct incorrect call to ValidateStruct and changed to ValidateStructRecursive
1 parent 773ef71 commit 684c339

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (v *Validator) validateStructRecursive(top interface{}, s interface{}) *Str
216216

217217
} else {
218218

219-
if structErrors := v.ValidateStruct(valueField.Interface()); structErrors != nil {
219+
if structErrors := v.validateStructRecursive(top, valueField.Interface()); structErrors != nil {
220220
validationErrors.StructErrors[typeField.Name] = structErrors
221221
// free up memory map no longer needed
222222
structErrors = nil

0 commit comments

Comments
 (0)