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

Function StructLevelInvalidError

validator_test.go:333–340  ·  view source on GitHub ↗
(sl StructLevel)

Source from the content-addressed store, hash-verified

331}
332
333func StructLevelInvalidError(sl StructLevel) {
334 top := sl.Top().Interface().(StructLevelInvalidErr)
335 s := sl.Current().Interface().(StructLevelInvalidErr)
336
337 if top.Value == s.Value {
338 sl.ReportError(nil, "Value", "Value", "required", "")
339 }
340}
341
342func stringPtr(v string) *string {
343 return &v

Callers

nothing calls this directly

Calls 3

TopMethod · 0.65
CurrentMethod · 0.65
ReportErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…