MCPcopy Create free account
hub / github.com/pace/bricks / ValidateRequest

Function ValidateRequest

http/jsonapi/runtime/validation.go:39–41  ·  view source on GitHub ↗

ValidateRequest checks the given struct and returns true if the struct is valid according to the specification (declared with go-validator struct tags) In case of an error, an jsonapi error message will be directly send to the client

(w http.ResponseWriter, r *http.Request, data interface{})

Source from the content-addressed store, hash-verified

37// is valid according to the specification (declared with go-validator struct tags)
38// In case of an error, an jsonapi error message will be directly send to the client
39func ValidateRequest(w http.ResponseWriter, r *http.Request, data interface{}) bool {
40 return ValidateStruct(w, r, data, "pointer")
41}
42
43// ValidateStruct checks the given struct and returns true if the struct
44// is valid according to the specification (declared with go-validator struct tags)

Callers 2

TestValidateRequestFunction · 0.85
UnmarshalFunction · 0.85

Calls 1

ValidateStructFunction · 0.85

Tested by 1

TestValidateRequestFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…