MCPcopy Index your code
hub / github.com/go-playground/validator / StructValidationTestStruct

Function StructValidationTestStruct

validator_test.go:271–277  ·  view source on GitHub ↗
(sl StructLevel)

Source from the content-addressed store, hash-verified

269}
270
271func StructValidationTestStruct(sl StructLevel) {
272 st := sl.Current().Interface().(TestStruct)
273
274 if st.String != "bad value" {
275 sl.ReportError(st.String, "StringVal", "String", "badvalueteststruct", "bad value")
276 }
277}
278
279func StructValidationNoTestStructCustomName(sl StructLevel) {
280 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…