Mongoose Unique Validator is a schema plugin which adds pre-save validation for unique fields within the schema.