Skip to content

Commit 5361dc3

Browse files
committed
Change unique message
1 parent d7ae5f8 commit 5361dc3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example/custom-messages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const messages = {
1515
required: '{path} is required',
1616
enum: '{path} is invalid',
1717
validate: '{path} is invalid',
18-
unique: '{path} is already exists',
18+
unique: '{path} already exists',
1919
boolean: '{path} must be a boolean',
2020
buffer: '{path} must be a buffer',
2121
objectId: '{path} must be a objectId',

example/unique.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object.save(function (err, doc) {
2525
const error = mongooseErrorHandler(err);
2626
console.log(error);
2727
/**
28-
* Error [MongooseValidatorError]: "name" is already exists
28+
* Error [MongooseValidatorError]: "name" already exists
2929
* name: 'MongooseValidatorError',
3030
* path: 'name',
3131
* kind: 'unique',

0 commit comments

Comments
 (0)