Only set namespace prefix when using FieldNameTag

pull/228/head
joeybloggs 9 years ago
parent afbcf59553
commit 0b533f264c
  1. 5
      validator.go

@ -487,7 +487,10 @@ func (v *Validate) tranverseStruct(topStruct reflect.Value, currentStruct reflec
if useStructName { if useStructName {
errPrefix += sName + "." errPrefix += sName + "."
nsPrefix += sName + "."
if v.fieldNameTag != "" {
nsPrefix += sName + "."
}
} }
// structonly tag present don't tranverseFields // structonly tag present don't tranverseFields

Loading…
Cancel
Save