laravel/framework — pull request #255 by KaneCohen (2013-02-04 19:30:34+00:00)
Title: Make arrays and its contents validatable

Example:

```html

````

will send to PHP following array:

````php
array('tags' => array('foo', 'bar', 'baz'));
````

Right now there's no way to check whole array for a certain rules, like alpha/numeric etc. This pull request tries to fix that.

With this patch you can validate `tags` array like so:

````php
$val = Validator::make(array('tags' => array('foo', 'bar', 'baz')), array('tags' => 'required|alpha'));
````

Validator will determine that `tags` key refers to the array and will proceed to validate each element according to set rules `required|alpha`;

This patch also allows to use dot notation to validate inner arrays of other arrays:

```html

````

````php
$input = array('tags' => array(
'new' => array('foo', 'bar', 'baz'),
'old' => array()
));

$val = Validator::make($input, array('tags.new' => 'required|alpha'));
````

In this case Validator will validate `new` array that is inside of the `tags` array.

P.S.: Some of the test were omitted because of a similarities with other tests.