Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 3c5d0b6

Browse files
authored
Update README.md
1 parent b29fb06 commit 3c5d0b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ This package changes the `message` to be an object with field names as keys:
2222
"error": "Bad Request",
2323
"message": [
2424
{
25-
"field": ["email"],
25+
"field": "email",
2626
"errors": ["email must be an email"]
2727
},
2828
{
29-
"field": ["phone"],
29+
"field": "phone",
3030
"errors": ["phone should not be empty"]
3131
}
3232
]
@@ -37,7 +37,7 @@ It also works for [nested values](https://github.com/typestack/class-validator#v
3737

3838
```json
3939
{
40-
"field": ["nestedObject", "name"],
40+
"field": "nestedObject.name",
4141
"errors": ["name should not be empty"]
4242
}
4343
```

0 commit comments

Comments
 (0)