Skip to content

@Param default validation #348

Closed
@jsmonkey

Description

@jsmonkey

Hi,

I found that This technique works not only with @Body but also with @Param, @QueryParam, @BodyParam and other decorators. in this validation docs article.

But by default @Param('id') id: number is not validated and accepts NaN as value in case of invalid id.
There is no validate option for @Param decorator, which mentioned in the docs.

So mb you need a fix to be with your library docs.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questionQuestions about the usage of the library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions