Validation In Express-Validator

前端 未结 3 787
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-29 12:30

I am using express-validator for validation. I am using mongoose for database, it also has validation built in. I want to know which one should I use?

I also want to

3条回答
  •  清歌不尽
    2020-12-29 13:06

    There is no way that Express-Validator can check a email address is unique or not, on the other hand MongoDB is not responsible for checking your entered email address is in correct format.

    So you must have to use both of them when they are in need because they serve completly diffrent purpose.

提交回复
热议问题