replace msg to tag
This commit is contained in:
@@ -40,7 +40,7 @@ func (h *Handler) CreateEvent(c echo.Context) (err error) {
|
||||
errors.As(err, &validationErrors)
|
||||
Fields := make(map[string]string)
|
||||
for _, validationError := range validationErrors {
|
||||
Fields[validationError.Field()] = validationError.Error()
|
||||
Fields[validationError.Field()] = validationError.Tag()
|
||||
}
|
||||
return c.JSON(http.StatusBadRequest, &utils.ValidationError{
|
||||
Type: "validation_error",
|
||||
|
||||
Reference in New Issue
Block a user