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

Function StructValidationNoTestStructCustomName

validator_test.go:279–285  ·  view source on GitHub ↗
(sl StructLevel)

Source from the content-addressed store, hash-verified

277}
278
279func StructValidationNoTestStructCustomName(sl StructLevel) {
280 st := sl.Current().Interface().(TestStruct)
281
282 if st.String != "bad value" {
283 sl.ReportError(st.String, "String", "", "badvalueteststruct", "bad value")
284 }
285}
286
287func StructValidationTestStructInvalid(sl StructLevel) {
288 st := sl.Current().Interface().(TestStruct)

Callers

nothing calls this directly

Calls 2

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…