MCPcopy
hub / github.com/danielgtaylor/huma / Add

Method Add

validate.go:181–187  ·  view source on GitHub ↗

Add an error to the validation result at the given path and with the given value.

(path *PathBuffer, v any, msg string)

Source from the content-addressed store, hash-verified

179// Add an error to the validation result at the given path and with the
180// given value.
181func (r *ValidateResult) Add(path *PathBuffer, v any, msg string) {
182 r.Errors = append(r.Errors, &ErrorDetail{
183 Message: msg,
184 Location: path.String(),
185 Value: v,
186 })
187}
188
189// Addf adds an error to the validation result at the given path and with
190// the given value, allowing for fmt.Printf-style formatting.

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected