Friday 23 August 2019

Moongose validation good practices

Hello, I am currently learning MEAN stack to build some basic applications and was wondering if there are any good practices regarding validating data while using mongoose.In my example I have registration endpoint and want only valid e-mails to pass through, and I don't know whether should I validate the data in the schema or in some middleware using for example express-validator module, perhaps it doesn't matter?

Submitted August 23, 2019 at 11:12AM by Szpinux

No comments:

Post a Comment