correct incorrect call to ValidateStruct and changed to
ValidateStructRecursive
pull/16/head
Dean Karn 10 years ago
parent 773ef71208
commit 684c339b0d
  1. 2
      validator.go

@ -216,7 +216,7 @@ func (v *Validator) validateStructRecursive(top interface{}, s interface{}) *Str
} else { } else {
if structErrors := v.ValidateStruct(valueField.Interface()); structErrors != nil { if structErrors := v.validateStructRecursive(top, valueField.Interface()); structErrors != nil {
validationErrors.StructErrors[typeField.Name] = structErrors validationErrors.StructErrors[typeField.Name] = structErrors
// free up memory map no longer needed // free up memory map no longer needed
structErrors = nil structErrors = nil

Loading…
Cancel
Save