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

Function StructValidationTestStructInvalid

validator_test.go:287–293  ·  view source on GitHub ↗
(sl StructLevel)

Source from the content-addressed store, hash-verified

285}
286
287func StructValidationTestStructInvalid(sl StructLevel) {
288 st := sl.Current().Interface().(TestStruct)
289
290 if st.String != "bad value" {
291 sl.ReportError(nil, "StringVal", "String", "badvalueteststruct", "bad value")
292 }
293}
294
295func StructValidationTestStructReturnValidationErrors(sl StructLevel) {
296 s := sl.Current().Interface().(TestStructReturnValidationErrors)

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…