1.0.2 • Published 5 years ago
mongo-validators v1.0.2
Mongo Validators
A Mongo DataBase Validation Errors Handler Package
Installation
Install via NPM:
npm install mongo-validators
Usage
javascript
.catch((err) => {
let errors = new Error(mongoErrors(err)); // return with mongo errors String array
console.log(errors);
next(errors); // throw an error with mongo error message
});
License
This project is licensed under the terms of the MIT license.