MCPcopy
hub / github.com/go-playground/validator / StructNamespace

Method StructNamespace

errors.go:112–112  ·  view source on GitHub ↗

StructNamespace returns the namespace for the field error, with the field's actual name. eg. "User.FirstName" see Namespace for comparison NOTE: this field can be blank when validating a single primitive field using validate.Field(...) as there is no way to extract its name

()

Source from the content-addressed store, hash-verified

110 // NOTE: this field can be blank when validating a single primitive field
111 // using validate.Field(...) as there is no way to extract its name
112 StructNamespace() string
113
114 // Field returns the field's name with the tag name taking precedence over the
115 // field's actual name.

Callers 10

AssertErrorFunction · 0.65
AssertDeepErrorFunction · 0.65
getErrorFunction · 0.65
TestNameNamespaceFunction · 0.65
mainFunction · 0.65
validateStructFunction · 0.65

Implementers 1

fieldErrorerrors.go

Calls

no outgoing calls

Tested by 8

AssertErrorFunction · 0.52
AssertDeepErrorFunction · 0.52
getErrorFunction · 0.52
TestNameNamespaceFunction · 0.52