Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <[email protected]>
  • Loading branch information
GentileFulvio and sindresorhus authored May 7, 2020
1 parent 6c96778 commit 5489f33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ It's also possible to add a separate message per validation:
```ts
ow('1234', ow.string.minLength(5).message((value, label) => `Expected ${label}, to be have a minimum length of 5, got \`${value}\``).url.message('This is no url'));
//=> ArgumentError: Expected string, to be have a minimum length of 5, got `1234`

ow('12345', ow.string.minLength(5).message((value, label) => `Expected ${label}, to be have a minimum length of 5, got \`${value}\``).url.message('This is no url'));
//=> ArgumentError: This is no url
```
Expand Down

0 comments on commit 5489f33

Please sign in to comment.