Use Joi, it’s an npm module
Unique as in like _id?
i want to use fastest-validator before mongoose validation . but i should know how i can control in mongoose too
like cellphone, usename like telegram username and ...
Just add { unique: true }?
https://stackoverflow.com/questions/21971666/mongoose-unique-field
no i want send response to front-end when i get this err from mongoose. this { unique: true } can't help
Обсуждают сегодня