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{})
| 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 |
| 39 | func 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) |
searching dependent graphs…