Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

express validator isn't doing anything #251

Open
CameronSima opened this issue Nov 17, 2019 · 0 comments
Open

express validator isn't doing anything #251

CameronSima opened this issue Nov 17, 2019 · 0 comments

Comments

@CameronSima
Copy link

These lines wont do anything:

export const postLogin = (req: Request, res: Response, next: NextFunction) => { check("email", "Email is not valid").isEmail() check("password", "Password cannot be blank").isLength({min: 1})

the checks() are middleware, they need to be in the middleware chain, not in the middle of a function

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

1 participant