Add an error to the validation result at the given path and with the given value.
(path *PathBuffer, v any, msg string)
| 179 | // Add an error to the validation result at the given path and with the |
| 180 | // given value. |
| 181 | func (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. |