Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is possible to throw error when non declared params are send in a request? #612

Closed
TheLox95 opened this issue Jul 19, 2018 · 3 comments
Closed

Comments

@TheLox95
Copy link

Let say I have this schema

router.post('/create', checkSchema({
    user_name: {
        in: ['body'],
        errorMessage: 'username required',
        exists: true,
    },
    password: {
        in: ['body'],
        errorMessage: 'required and should be 8 characters contains number and letter',
        exists: true,
    },
}), middlewares.create(create));

I would like to know if there is a option to not allow any other param besides these and show an error

@TheLox95 TheLox95 changed the title It is possible to throw error when non declare params are passed? It is possible to throw error when non declared params are send in a request? Jul 19, 2018
@gustavohenke
Copy link
Member

Duplicate of #558

@gustavohenke gustavohenke marked this as a duplicate of #558 Jul 20, 2018
@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
@gustavohenke
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants