File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1- # Mongoose Validation Failed Handler
1+ # Mongoose Validation Error Message Handler
2+ is responsilbe transfroming mongoose validation error into generic form.
23
34## Install
45
@@ -240,7 +241,7 @@ app.listen(3000)
240241### messages
241242
242243| Kind | Properties | Message | SchemaTypeOptions
243- | ------------------------| ---------------|
244+ | ---------------| --------------- | --------------- ---------| ---------------|
244245| base | ` path ` , ` value ` | {path} is invalid |
245246| boolean | ` path ` , ` value ` | {path} must be a boolean | type |
246247| buffer | ` path ` , ` value ` | {path} must be a buffer | type |
@@ -258,12 +259,12 @@ app.listen(3000)
258259| regexp | ` path ` , ` value ` , ` regexp ` | {path} format is invalid | match |
259260| required | ` path ` , ` value ` | {path} is required | required |
260261| string | ` path ` , ` value ` | {path} must be a string | type |
261- | unique
| email ' [email protected] ' already exists
. | unique
| 262+ | unique | ` path ` , ` value ` | "{path}" is already exists | unique |
262263| validate | ` path ` , ` value ` , ` enumValues ` | {path} is invalid | validate |
263264
264265### paths
265266
266267` path ` : String
267268- ` original ` : Boolean,
268269- ` kind ` : String,
269- - ` message ` : String
270+ - ` message ` : String
You can’t perform that action at this time.
0 commit comments