Skip to content

Commit

Permalink
simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Mar 24, 2024
1 parent 660ea40 commit 5f897d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -45,11 +45,11 @@ $validate = Shape::of('id', Is::int())
->with('username', Is::string())
->with(
'addresses',
Is::array()
->and(Is::list())
->and(Each::of(Is::string())->map(
Is::list(
Is::string()->map(
static fn(string $address) => new YourModel($address),
))
)
)
);
$result = $validate($valid)->match(
static fn(array $value) => $value,
Expand Down

0 comments on commit 5f897d1

Please sign in to comment.