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

Method Field

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

Field returns the field's name with the tag name taking precedence over the field's actual name. `RegisterTagNameFunc` must be registered to get tag value. eg. JSON name "fname" see StructField for comparison

()

Source from the content-addressed store, hash-verified

119 // eg. JSON name "fname"
120 // see StructField for comparison
121 Field() string
122
123 // StructField returns the field's actual name from the struct, when able to determine.
124 //

Callers 15

AssertErrorFunction · 0.95
AssertDeepErrorFunction · 0.95
isValidateFnFunction · 0.65
extractStructCacheMethod · 0.65
validateStructMethod · 0.65
TestNameNamespaceFunction · 0.65
TestAnonymousFunction · 0.65
TestNilValidatorFunction · 0.65
TestMapDiveValidationFunction · 0.65

Implementers 1

fieldErrorerrors.go

Calls

no outgoing calls

Tested by 15

AssertErrorFunction · 0.76
AssertDeepErrorFunction · 0.76
TestNameNamespaceFunction · 0.52
TestAnonymousFunction · 0.52
TestNilValidatorFunction · 0.52
TestMapDiveValidationFunction · 0.52
TestCustomFieldNameFunction · 0.52