Remove mongoose model validation

Remove or Skip or Disable mongoose model  validation on model time in nodejs

I’m looking for creating a new Document that is saved to the mongodb regardless of valid. I just want to temporarily skip or disable mongoose validation upon model save call.

We were facing problem continue but now I  found solution.you  can use  validateBeforeSave: false on save time.

Remove mongoose model  validation code img

like as your model name is User then you can use this

User.save({ validateBeforeSave: false }, function(error,data) {
 
});

for more info Contact Us>>>