Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate multi dimensional array #581

Open
wants to merge 1 commit into
base: 3.4/develop
Choose a base branch
from
Open

Validate multi dimensional array #581

wants to merge 1 commit into from

Conversation

evtaylor
Copy link

@evtaylor evtaylor commented Dec 5, 2014

See http://dev.kohanaframework.org/issues/4035

$array = array(
    'user' => array(
        'name' => 'Evan'
    )
);

$validation = Validation::factory($array)
    ->rule('user.name', 'not_empty'); 

By adding rules using existing dot notation
@rjd22
Copy link

rjd22 commented Dec 6, 2014

@evtaylor this needs tests for both the array path as the Validator using the array path.

@enov enov added the Needs Test label May 8, 2015
@arteymix
Copy link

arteymix commented Nov 7, 2015

If we go multidimensional, what about a * notation to specify all keys within an array?

->rule(`users.*.name`, `not_empty`)

@neo22s neo22s added this to the 4.0.0 milestone Mar 21, 2016
@neo22s
Copy link
Member

neo22s commented Mar 21, 2016

for 4.0.0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants