func (fe *fieldError) StructField() string {
	return fe.structNs[len(fe.structNs)-int(fe.structfieldLen):]
}
returns the field's actual name from the struct, when able to determine.
package validator
import (
	"bytes"
	"fmt"
	"reflect"
	"strings"
	ut "github.com/go-playground/universal-translator"
)
const (
	fieldErrMsg = "Key: '%s' Error:Field validation for '%s' failed on the '%s' tag"
)
type ValidationErrorsTranslations map[string]string
type InvalidValidationError struct {
	Type reflect.Type
}
func (e *InvalidValidationError) Error() string {
	if e.Type == nil {
		return "validator: (nil)"
	}
	return "validator: (nil " + e.Type.String() + ")"
}
type ValidationErrors []FieldError
func (ve ValidationErrors) Error() string {
	buff := bytes.NewBufferString("")
	var fe *fieldError
	for i := 0; i < len(ve); i++ {
		fe = ve[i].(*fieldError)
		buff.WriteString(fe.Error())
		buff.WriteString("\n")
	}
	return strings.TrimSpace(buff.String())
}
func (ve ValidationErrors) Translate(ut ut.Translator) ValidationErrorsTranslations {
	trans := make(ValidationErrorsTranslations)
	var fe *fieldError
	for i := 0; i < len(ve); i++ {
		fe = ve[i].(*fieldError)
		trans[fe.ns] = fe.Translate(ut)
	}
	return trans
}
type FieldError interface {
	Tag() string
	ActualTag() string
	Namespace() string
	StructNamespace() string
	Field() string
	StructField() string
	Value() interface{}
	Param() string
	Kind() reflect.Kind
	Type() reflect.Type
	Translate(ut ut.Translator) string
	Error() string
}
var _ FieldError = new(fieldError)
var _ error = new(fieldError)
type fieldError struct {
	v              *Validate
	tag            string
	actualTag      string
	ns             string
	structNs       string
	fieldLen       uint8
	structfieldLen uint8
	value          interface{}
	param          string
	kind           reflect.Kind
	typ            reflect.Type
}
func (fe *fieldError) Tag() string {
	return fe.tag
}
func (fe *fieldError) ActualTag() string {
	return fe.actualTag
}
func (fe *fieldError) Namespace() string {
	return fe.ns
}
func (fe *fieldError) StructNamespace() string {
	return fe.structNs
}
func (fe *fieldError) Field() string {
	return fe.ns[len(fe.ns)-int(fe.fieldLen):]
}