Skip to content

Disallow unknown fields on bind #4335

@oleg-yudovich

Description

@oleg-yudovich

Hi,

In Gin, we use ShouldBindJSON and ShouldBindQuery to deserialize and validate the request body/query parameters.
Is that any way in Gin to say that I want to disallow any body/query parameters (keys) that are not defined on my body/query model?

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