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

Commit cbb51c9

Browse files
committed
docs: small example improvement
1 parent 7a89bf2 commit cbb51c9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/03-rules_each-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ type: `?string` default: `Invalid key: {{ message }}`
3939
Message that will be shown if at least one input value key is invalid according to the given `validator`.
4040

4141
```php
42+
// Throws: Invalid key: The color key value should be of type "string", 1 given.
4243
Validator::eachKey(
4344
Validator::type('string')
44-
)->assert(['red' => '#f00', 1 => '#0f0'], 'color');
45-
// Throws: Invalid key: The color key value should be of type "string", 1 given.
45+
)->assert(['red' => '#f00', 1 => '#0f0'], 'color');
4646
```
4747

4848
The following parameters are available:

docs/03-rules_each-value.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ type: `?string` default: `At key "{{ key }}": {{ message }}`
3939
Message that will be shown if at least one input value element is invalid according to the given `validator`.
4040

4141
```php
42+
// Throws: At key 2: The color value should not be blank, "" given.
4243
Validator::eachValue(
4344
Validator::notBlank()
44-
)->assert(['red', 'green', ''], 'color');
45-
// Throws: At key 2: The color value should not be blank, "" given.
45+
)->assert(['red', 'green', ''], 'color');
4646
```
4747

4848
The following parameters are available:

0 commit comments

Comments
 (0)