Skip to content

Commit b086b3c

Browse files
authored
Update README.md
1 parent 06c152b commit b086b3c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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

0 commit comments

Comments
 (0)