-
Notifications
You must be signed in to change notification settings - Fork 136
Conversation
doc/book/validators/explode.md
Outdated
|
||
The following options are supported for `Zend\Validator\Explode`: | ||
|
||
- `valueDelimiter`: Defines the delimiter used to explode the value to an array. It defaults to `,`. If working with an array, this option isn't used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If working with an array, this option isn't used.
We should clarify that the given "value" is meant here.
doc/book/validators/explode.md
Outdated
]); | ||
|
||
$value = [1, 4, 6, 8]; | ||
$return = $valid->isValid($value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$valid
is wrong here.
I would change the example:
$explodeValidator->isValid([1, 4, 6]); // returns true
$explodeValidator->isValid([1, 4, 6, 8]); // returns false
doc/book/validators/explode.md
Outdated
|
||
$value = [1, 4, 6, 8]; | ||
$return = $valid->isValid($value); | ||
// returns false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be deleted.
doc/book/validators/explode.md
Outdated
// returns false | ||
``` | ||
|
||
The above example returns `true` if all $value items are between 1 and 6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be deleted, because is covered now in the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add another example which demonstrate the usage of valueDelimiter
. Thanks!
Improved valueDelimiter description. Fixed array example Added explode string example.
Hi @froschdesign , I added the valueDelimiter example and improved the valueDelimiter description. I also appreciated your suggestions and incorporated them into the chapter. |
Added Explode validator documentation
Thanks, @renanlibrato! |
I've wrote the basic documentation for Explode validator.
It came useful for me lately so I'd like to contribute with it.
It fixes both #171 and #137 , which are duplicates.