[v] I have looked at the documentation here first?
yes
[v] I have looked at the examples provided that may showcase my question here?
yes
Package version eg. v9, v10:
The package version I used is 10.
Issue, Question or Enhancement:
I have a question. I was writing a REST API server that receives images and stores them in a database.
Convert the client's request to
type ImageCreateRequest struct {
Name string `form:"name" validate:"required"`
Description string `form:"description"`
Image *multipart.FileHeader `form:"image" validate:"required,image"`
}
After receiving this format
var err error
if request.Image, err = c.FormFile("image"); err != nil {
return nil, err
}
if err := validator.RequestValidator(request.Image.Filename); err != nil {
return nil, err
}
I parsed it this way, and proceeded with the typechecking.
However, interface conversion: error is *validator.InvalidValidationError, not validator.ValidationErrors
(For reference, the framework used gofiber v2.)
I got this error.
I am at a loss to find a solution to this problem.
[v] I have looked at the documentation here first? yes
[v] I have looked at the examples provided that may showcase my question here? yes
Package version eg. v9, v10:
The package version I used is 10.
Issue, Question or Enhancement:
I have a question. I was writing a REST API server that receives images and stores them in a database. Convert the client's request to
After receiving this format
I parsed it this way, and proceeded with the typechecking. However, interface conversion: error is *validator.InvalidValidationError, not validator.ValidationErrors (For reference, the framework used gofiber v2.)
I got this error. I am at a loss to find a solution to this problem.
I would be grateful if you could help me out.