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

Commit 7797d90

Browse files
committed
Minor edits and additions to Explode validation
1 parent f35e804 commit 7797d90

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

doc/book/validators/explode.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# Explode Validator
22

3-
`Zend\Validator\Explode` executes a validator for each item exploded.
3+
`Zend\Validator\Explode` executes a validator for each item exploded from an
4+
array.
45

56
## Supported options
67

78
The following options are supported for `Zend\Validator\Explode`:
89

9-
- `valueDelimiter`: Defines the delimiter used to explode the value to an array. It defaults to `,`. If the given value is an array, this option isn't used.
10+
- `valueDelimiter`: Defines the delimiter used to explode values from an array.
11+
It defaults to `,`. If the given value is an array, this option isn't used.
1012
- `validator`: Sets the validator that will be executed on each exploded item.
13+
This may be a validator instance, or a validator service name.
1114

1215
## Basic usage
1316

14-
To validate if every item in an array is into a certain haystack:
17+
To validate if every item in an array is in a specified haystack:
1518

1619
```php
1720
$inArrayValidator = new Zend\Validator\InArray([
18-
'haystack' => [1, 2, 3, 4, 5, 6]
21+
'haystack' => [1, 2, 3, 4, 5, 6],
1922
]);
2023

2124
$explodeValidator = new Zend\Validator\Explode([
@@ -28,11 +31,11 @@ $explodeValidator->isValid([1, 4, 6, 8]); // returns false
2831

2932
## Exploding strings
3033

31-
To validate if every e-mail in an string is into a certain name list:
34+
To validate if every e-mail in a string is contained in a list of names:
3235

3336
```php
3437
$inEmailListValidator = new Zend\Validator\InArray([
35-
38+
3639
]);
3740

3841
$explodeValidator = new Zend\Validator\Explode([

0 commit comments

Comments
 (0)