diff --git a/validator.go b/validator.go index 6861337..a24143b 100644 --- a/validator.go +++ b/validator.go @@ -487,7 +487,10 @@ func (v *Validate) tranverseStruct(topStruct reflect.Value, currentStruct reflec if useStructName { errPrefix += sName + "." - nsPrefix += sName + "." + + if v.fieldNameTag != "" { + nsPrefix += sName + "." + } } // structonly tag present don't tranverseFields