Explode validator: allow any value type to be validated #3527

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@cgmartin
Contributor

cgmartin commented Jan 23, 2013

Currently, the explode validator only allows string and array types to be tested. This PR relaxes the type checking to allow any type to be passed to isValid(), and defer/proxy the validity check to the bound validator(s). This allows the Explode validator to be more flexible and handle additional use-cases.

Also added support for iterating Traversables (not just arrays).

@cgmartin

This comment has been minimized.

Show comment Hide comment
@cgmartin

cgmartin Jan 23, 2013

Contributor

One use-case example: Filtering Select/MultiCheckbox values with a Null filter, as reported in #2726.

Contributor

cgmartin commented Jan 23, 2013

One use-case example: Filtering Select/MultiCheckbox values with a Null filter, as reported in #2726.

@ghost ghost assigned weierophinney Jan 25, 2013

weierophinney added a commit that referenced this pull request Jan 25, 2013

Merge branch 'hotfix/3527' into develop
Forward port #3527

Conflicts:
	library/Zend/Validator/Explode.php

weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015

Merge branch 'hotfix/3527' into develop
Forward port zendframework/zendframework#3527

Conflicts:
	library/Zend/Validator/Explode.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment