fuel/core — pull request #763 by crynobone (2012-01-05 06:16:50+00:00)
Title: Validation::add_field() should accept an array for list of rules

Instead of preparing each rules as a piped string, it would be nice if we can provide an array.

I had a problem using match_pattern with `|` regex because `Validation::add_field` would assume it a separator between two rule and cause validation can't validate the rules properly.

## Example

$val->add_field('gender', 'Gender', 'required|match_pattern[/^(m|f)$/]');

## Alternative

I know you can use `$val->add_field('gender', 'Gender')->add_rule('match_pattern', '/^(m|f)$/');` but the pull request should work the same way without much changes.

Signed-off-by: crynobone