Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Jun 5, 2021
1 parent a5fb955 commit 504e643
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ Use functions
},
res: {
body: {
// $ indicates the field to be verified, corresponding to the response data `res.body.createdAt`
// $ indicates the field to be verified, here is `res.body.createdAt`
createdAt:'isDate($)', @eval
// Of course you can use regex directly
Expand Down Expand Up @@ -436,7 +436,8 @@ JSON describes data and annotation describes logic.
"$> 2", @eval
"$ <= 2", @eval
],
// Using @partial, we only verify the part of the object we are interested in `a`, ignore `b`
// Using @partial, we only verify the part of the object.
// We are interested in `a`, ignore `b`
v5: { @partial
a: 3,
},
Expand Down

0 comments on commit 504e643

Please sign in to comment.