Issue with Laravel Rules & Regex (OR) operator

http://laravel.com/docs/validation#rule-regex

regex:pattern

The field under validation must match the given regular expression.

Note: When using the regex pattern, it may be necessary to specify rules in an array instead >of using pipe delimiters, especially if the regular expression contains a pipe character.

To clarify:
You would do something like this

$rules = array('test' => array('size:5', 'regex:foo'));

Leave a Comment