laravel/framework — pull request #5734 by penoonan (2014-09-14 20:34:35+00:00)
Title: Add public iterate() method to validator

I needed to be able to loop through some repeated array input, but the validator didn't allow that functionality out of the box. So I extended it with an "iterate()" public method (which is called on the resolved validator instance) and thought I'd see if it was worth a merge.

You pass the name of the repeating attribute, rules and messages to the iterate() method. It also uses recursion to allow for validating against nested repeating sets of rules. I.e., you can validate X number of books with X number of authors with X number of credentials and so on.

Better explanation and examples here: https://github.com/penoonan/laravel-iterable-validator

PS: This is my second attempt at this pull request. I closed the first one, and I am bad at git.