Skip to content

Unknow Type when binding slice of struct in formdata request #162

Open
@bashayerAlsalman

Description

@bashayerAlsalman

can not bind a slice of struct when the request type is formdata

type request struct {
    id                uint          `form:"id" json:"id"`
    Products   []product `form:"products"`
}

type product struct {
    Name          string      `form:"name"`
    Quantity      int           `form:"quantity"`
   Price              float32  `form:"price"`
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions