vlucas/valitron — pull request #2 by joelclermont (2013-03-05 03:14:13+00:00)
Title: Issue #1 tests and code to support adding multiple rules via an array

I have made progress, but I need some feedback. This is not ready to merge yet.

Look at my last test and you will see that it is losing the last field in the required definition. The reason for this is because I'm merging params down into an array before calling the rule() method. In this case, we don't want `rule('required', 'missing_field_1', 'missing_field_2')` we want `rule('required', array('missing_field_1', 'missing_field_2'))`.

I can think of two approaches to solving this:
1. Add a switch case to set which rule types have additional params and which don't (like the required type).
2. Use reflection to look up the validate method for that rule type and see if it accepts a `$params` option.

Thoughts?