-1

What you think is the best, using the mongoose validation module at your models definition or make your own validation functions before trying to save some document?

Cristiano Sarmento
  • 633
  • 2
  • 9
  • 19

1 Answers1

0

You can create your own validator, or you can use a npm package and extend the validator package to mongoose.

You can use, for example, mongules to do your validations in mongoose.

Ricardo Barros
  • 205
  • 1
  • 8